UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
A server running cPanel.
https://{host}:{port}/execute/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ResourceUsage/get_usages
- A server running cPanel.
https://cpanel-server.tld:2083/execute/ResourceUsage/get_usages
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/ResourceUsage/get_usagesResponse
application/json
{ "apiversion": 3, "func": "get_usages", "module": "ResourceUsage", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Query
A pipe-delimited list of the account's statistics.
Click for a list of available display parameters.
addondomains— Information about the account's addon domains.apacheversion— The server's Apache version.autoresponders— Information about the account's auto-responders.bandwidthusage— Information about the account's bandwidth usage.cachedlistdiskusage— The amount of cached mailing list disk space the account currently uses.cachedmysqldiskusage— The amount of cached disk space that the account's MySQL® databases currently use.cachedpostgresdiskusage— The amount of cached disk space that the account's PostgreSQL databases use.cpanelversion— The server's cPanel version.dedicatedip— Account websites that use dedicated IP addresses.diskusage— Information the account's disk space usage.emailaccounts— Information about the account's email accounts.emailfilters— Information the account's email filters.emailforwarders— Information about the account's forwarders.fileusage— Information about the account's file usage.ftpaccounts— Information about the account's FTP accounts.hostingpackage— The account's hosting package.hostname— The server's hostname.kernelversion— The operating system's kernel version.localip— Account websites that use local IP addresses.machinetype— The type of operating system that the server uses.mailinglists— Information the account's mailing lists.mysqldatabases— The number of MySQL databases the account possesses.mysqldiskusage— The amount of disk space that the account's MySQL databases use.mysqlversion— The server's MySQL version.operatingsystem— The server's operating system.parkeddomains— Information about the account's parked domains (aliases).perlpath— The Perl binary's absolute path.perlversion— The server's Perl version.phpversion— The server's PHP version.postgresqldatabases— The number of PostgreSQL databases the cPanel account possesses.postgresdiskusage— The amount of disk space that the cPanel account's PostgreSQL databases use.sendmailpath— The path to the system's sendmail binary.sharedip— Any of the account's websites that use a shared IP address.shorthostname— The short version of your server's hostname.sqldatabases— Information about the all of the account's SQL databases.subdomains— Information about the account's subdomains.theme— The account's current theme.
Note:
- This function may require URI-encode format (
%7C) or quotes (") in some contexts, such as the command line tool. - Some display parameters may be unavailable based on the server's configuration.
Example: display=bandwidthusage|diskusage
The absolute file path to an alternative infinity symbol image.
Default null
Example: infinityimg=/home/example/infinity.png
A phrase to represent infinity that the locales system can use.
Default null
Example: infinitylang=infinity
The minimum level at which to return warnings.
Default null
Example: warninglevel=87
Whether to return all results with a warning.
1— Return only warnings that exceed thewarninglevelparameter's value.0— Return all results.
Default null
Enum10
Example: warnings=0
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/StatsBar/get_stats
- A server running cPanel.
https://cpanel-server.tld:2083/execute/StatsBar/get_stats
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/StatsBar/get_stats?display=bandwidthusage%2Cdiskusage&infinityimg=%2Fhome%2Fexample%2Finfinity.png&infinitylang=infinity&rowcounter=even&warninglevel=87&warnings=0&warnout=0'Response
application/json
{ "apiversion": 3, "func": "get_stats", "module": "StatsBar", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }