5 functions, invoked through the cpanel_uapi tool.
scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Branding", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
featurestring
The application's feature name. The app_key parameter's value.
filestring
The application's icon's filename.
groupstring
The application's group.
heightinteger
The application's icon's height, in pixels.
ifstring
Conditional arguments that determine whether to display the item, if any exist. Conditional arguments that determine whether to display the item. For example, $isreseller indicates that the item only displays for reseller accounts. For more information, read our Guide to cPanel Variables documentation.
imgtypestring
The item's image type. icon is the only possible value.
One of: icon
itemdescstring
The application's display name.
itemorderinteger
The application's order in the dynamicui.conf file representing the application's display order in cPanel's Home interface. For example, the first item on the cPanel Home interface has an itemorder value of 1.
modulestring
The application's module. A valid module name.
searchtextstring
One or more search terms. The application's icon will display when users enter these search terms in the Quick Find text box. A space-separated list of search terms.
subtypestring
The item's subtype. img is the only possible value .
One of: img
typestring
The application's type. image is the only possible value.
One of: image
urlstring
The location to which the application's icon links. A valid filepath or URL.
widthinteger
The application's icon's width representing an image width, in pixels.
This function retrieves an application's information from a specific theme's dynamicui.conf file.
app_keysstringOptional
A comma-separated list of an application feature names. If you do not specify this parameter, the output will include all of the applications that the dynamicui.conf file contains. Note: This value must match an application's feature value in the dynamicui.conf file. For more information, read our Guide to cPanel Interface Customization - Appkeys documentation.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
This function retrieves information about the groups and applications in the authenticated user's cPanel interface.
nvargliststringOptional
A pipe-separated list of group names denoting the order in which to sort the groups. If you do not supply a value, the function does not sort the groups. Note:arglist is an alias for this parameter.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
default_group_orderobject
An object that defines the default order of applications in cPanel.
grouporderarray<string>
A list of group IDs, in the order in which the groups appear.
groupsarray<object>
Information about each group in the cPanel interface.
descstring
The group's description.
groupstring
The group's ID.
itemsarray<object>
The groups and their application details.
acontentstring
The content of a tag in the application's link.
base64_png_imagestring
The application's icon in Base64 format.
featurestring
A feature name. The icon only displays if the cPanel user can access this feature.
filestring
The application's icon's filename.
groupstring
The item's group.
heightstring
The application icon height, in pixels.
ifstring
An expression containing cPanel variables that determine whether to display the item. The function only returns this value if any variables exist. For example, $isreseller indicates that the item only displays for reseller accounts. For more information, read our Guide to cPanel Variables documentation.
imgtypestring
The item's image type. icon is the only possible value.
One of: icon
implementsstring
The implements name of the application. WHM API 1's create_user_session and get_users_links functions use this value.
itemdescstring
The application's display name.
itemorderstring
The application's order in the dynamicui.conf file. This value represents the application's display order in cPanel's Home interface.
modulestring
The Perl module that the application requires.
onclickstring
JavaScript function that the browser calls before or instead of URL navigation.
searchtextstring
One or more space-separated search terms. The icon will display when users enter these search terms in the Quick Find text box in the cPanel interface.
subtypestring
The item's subtype. img is the only possible value.
One of: img
targetstring
The target of the application's link.
touchstring
Conditional arguments that determine whether to display the item, if a specified touch file exists.
typestring
The application's type. image is the only possible value.
One of: image
urlstring
The path to which the application's icon links.
widthstring
The application's icon's width, in pixels.
implementsobject
An object mapping the implements names to Appkey values for applications in cPanel. For example, use this mapping to determine that the implements value SSL_TLS_Status maps to the Appkey value tls_status. Note: The Appkey for an application can be found in the key attribute elsewhere in the API response. The implements for an application can be found in the implements attribute elsewhere in the API response. * For more information about Appkey values, read our Guide to cPanel Interface Customization - Appkeys documentation.
indexobject
The applications and the order in which they appear in the cPanel interface.
This function retrieves an application's information from a specific theme's sitemap.json file.
docrootstringRequired
The absolute path to the directory containing the sitemap.json file. This is the path to your theme's document root.
app_keysstringOptional
A comma-separated list of Appkey names. If you do not specify this parameter, the output will include all of the applications that the sitemap.json file contains. Note: This value must match an application's key value in the sitemap.json file. For more information, read our Guide to cPanel Interface Customization - Appkeys documentation.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
Return branding file content from the active theme
This function retrieves and renders a branding file from the active theme. The file may be a Template Toolkit (.tt) file or a standard HTML/image file. When the file is a Template Toolkit file, the system processes it and returns the rendered output. Otherwise, the system returns the file's raw or HTML-encoded content. operationId: Branding::include
filestringRequired
The relative path to the branding file within the theme directory.
datastringOptional
A JSON-encoded object containing additional variables to pass to the Template Toolkit template when rendering a .tt file. This parameter is ignored for non-template files.
rawintegerOptional
Whether to return the raw file content without HTML encoding. 1 — Return the raw file content. 0 — Return HTML-encoded content. This is the default behavior. This parameter has no effect when the file is a Template Toolkit (.tt) file.
skip_defaultintegerOptional
Whether to skip the default branding fallback. 1 — Do not fall back to the default branding file if the theme-specific file does not exist. This parameter has no effect for accounts that do not have a branding package assigned; the theme fallback is always applied in that case. 0 — Fall back to the default branding file. This is the default behavior.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
The rendered or retrieved content of the requested branding file. For Template Toolkit files, this is the processed template output. For other files, this is the raw or HTML-encoded file content.