uapi_cpanel

This function calls a UAPI function through the WHM API. This function's output will match the UAPI function that it calls.

Authorizations:
query Parameters
cpanel.function
required
string
Example: cpanel.function=get_stats

The UAPI function to call.

Note:

You must include the UAPI function's required parameters. You can also include its optional parameters.

For example, to call the UAPI get_stats function with its required display parameter and the bandwidthusage and diskusage values:

display=bandwidthusage|diskusage

cpanel.module
required
string
Example: cpanel.module=StatsBar

The UAPI function's cPanel module.

cpanel.user
required
string
Example: cpanel.user=username

The cPanel username to call with the UAPI function.

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 uapi_cpanel cpanel.function='get_stats' cpanel.module='StatsBar' cpanel.user='username'

Response samples

Content type
application/json
{
  • "data": {
    • "uapi": {
      • "data": [
        • {
          • "_count": "0",
          • "_max": "unlimited",
          • "_maxed": 0,
          • "count": "0",
          • "feature": "addondomains",
          • "id": "addondomains",
          • "is_maxed": 0,
          • "item": "Addon Domains",
          • "max": "unlimited",
          • "maxed_phrase": "You are using your maximum allotment ([numf,_1]) of addon domains.",
          • "module": "Park",
          • "name": "addondomains",
          • "near_limit_phrase": "You are using [numf,_1] of [numf,_2] available addon [numerate,_2,domain,domains].",
          • "percent": 0,
          • "percent10": 0,
          • "percent20": 0,
          • "percent5": 0,
          • "phrase": "Addon Domains",
          • "role": "WebServer",
          • "zeroisunlimited": 0
          }
        ],
      • "errors": null,
      • "messages": null,
      • "metadata": {
        • "transformed": 1
        },
      • "status": 1,
      • "warnings": null
      }
    },
  • "metadata": {
    • "command": "uapi_cpanel",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}