Returns branding file's path

This function retrieves a branding file's path. The function searches the /usr/local/cpanel/base/appname/theme/branding/ directory, where:

  • appname represents frontend if you use a cPanel session, or webmail if you use a Webmail session.
  • theme represents paper_lantern, or the name of another cPanel theme on the server.

Note: This function only works in the Paper Lantern theme. We deprecated Paper Lantern in cPanel & WHM version 100 and will remove the function in version 110. This function will not work in the Jupiter theme.

SecurityBasicAuth
Request
query Parameters
checkmain
integer
Default: 0

"Whether the function should search the account's /cpanelbranding directory."

  • '1' - Search the directory.
  • '0' - Do not search the directory.
Enum: 0 1
Example: checkmain=1
file
string

The file name. If you do not specify a value, the function returns the path to the branding directory.

Example: file=local.css
needfile
integer
Default: 0

"Whether to return the /unprotected/broken.gif image with a failure message when the requested file does not exist."

  • '1' - Return nothing.
  • '0' - Return the images and a failure message.
Enum: 0 1
Example: needfile=0
nomagic
integer
Default: 0

cPanel_magic_revision_########## prefix in the uri file path.

  • 1 - Do not include the prefix.
  • 0 - Include the prefix.
Enum: 0 1
Example: nomagic=0
skipdefault
integer
Default: 0

Whether to ignore the default theme.

  • '1' - Ignore the theme default.
  • '0' - Do not ignore the theme default.
Enum: 0 1
Example: skipdefault=0
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Branding/file
Request samples
uapi --output=jsonpretty \
  --user=username \
  Branding \
  file
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "file",
  • "module": "Branding",
  • "result": {
    • "data": {
      • "path": "/usr/local/cpanel/base/frontend/paper_lantern/branding/local.css",
      • "type": "cphtml",
      • "uri": "/cPanel_magic_revision_1327526145/frontend/paper_lantern/branding/local.css"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}