UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
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
The relative path to the branding file within the theme directory.
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.
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.
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.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Branding/include
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Branding/include
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Branding \
include \
file='header.tt'{ "apiversion": 3, "func": "include", "module": "Branding", "result": { "data": "<div class=\"header\">Welcome</div>", "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }