WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The permissions of packages that you wish to list.
all— All packages on the system.creatable— Packages that the authenticated user can use for accounts.editable— Packages that the authenticated user can edit.viewable— Packages that the authenticated user can view.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/listpkgs
- A server running WHM.
https://whm-server.tld:2087/json-api/listpkgs
- 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/whm.openapi/listpkgs?want=all'{ "data": { "pkg": [ … ] }, "metadata": { "command": "listpkgs", "reason": "OK", "result": 1, "version": 1 } }
A space-separated list of one or more of the hosting plan's package extensions.
The hosting plan's bandwidth limit.
unlimited— The hosting plan allows unlimited bandwidth.
Whether CGI is enabled for the hosting plan.
1— Enabled.0— Disabled.
Whether the hosting plan enables Digest Authentication.
y— Enabled.n— Disabled.
Whether shell access is enabled for the hosting plan.
1— Enabled0— Disabled.
Whether the hosting plan grants accounts a dedicated IP address.
y— Dedicated IP address.n— Shared IP address.
The percentage of failed or deferred email messages that the hosting plan can send per hour before the system rate-limits outgoing mail.
unlimited— The hosting plan allows unlimited email messages.
The maximum number of emails that the hosting plan can send in one hour.
unlimited— The hosting plan allows unlimited emails per hour.
The hosting plan's maximum email account quota size, in megabytes (MB).
unlimited— The hosting plan allows an unlimited email account quota size.
The hosting plan's maximum number of Team users.
The hosting plan's maximum number of addon domains.
unlimited— The hosting plan allows unlimited addon domains.
The hosting plan's maximum number of FTP accounts.
unlimited— The hosting plan allows for unlimited FTP accounts.
The hosting plan's maximum number of mailing lists.
unlimited— The hosting plan allows an unlimited number of mailing lists.
The hosting plan's maximum number of parked domains (aliases).
unlimited— The hosting plan allows unlimited parked domains.
The hosing plan's maximum number of email accounts.
unlimited— The hosting plan's can create unlimited email accounts.
The hosting plan's maximum number of SQL databases.
unlimited— The hosting plan allows unlimited SQL databases.
The hosting plan's maximum number of subdomains.
unlimited— The hosting plan allows unlimited subdomains.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/matchpkgs
- A server running WHM.
https://whm-server.tld:2087/json-api/matchpkgs
- 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/whm.openapi/matchpkgs?_PACKAGE_EXTENSIONS=%27ext1+ext2+ext3%27&BWLIMIT=unlimited&CGI=1&CPMOD=jupiter&DIGESTAUTH=n&FEATURELIST=myfeaturelist&HASSHELL=1&IP=n&LANG=en&MAX_DEFER_FAIL_PERCENTAGE=unlimited&MAX_EMAIL_PER_HOUR=unlimited&MAX_EMAILACCT_QUOTA=unlimited&MAX_TEAM_USERS=7&MAXADDON=unlimited&MAXFTP=2&MAXLST=unlimited&MAXPARK=unlimited&MAXPOP=unlimited&MAXSQL=unlimited&MAXSUB=unlimited"A=unlimited'{ "data": { "pkg": { … } }, "metadata": { "command": "matchpkgs", "reason": "OK", "result": 1, "version": 1 } }