WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/quota_enabled
- A server running WHM.
https://whm-server.tld:2087/json-api/quota_enabled
- 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/quota_enabled{ "data": { "quota_enabled": 0 }, "metadata": { "command": "quota_enabled", "reason": "OK", "result": 1, "version": 1 } }
The month to query, in numeric format.
This value defaults to the current month.
A Perl Compatible Regular Expression (PCRE) that filters the results. The system matches the PCRE against the searchtype parameter's specified type.
If you do not specify a value for both the searchtype and search parameters, the function does not use the search criteria.
The account information to query.
domain— Match domains against thesearchregular expression.owner— Match the WHM user who owns the account against thesearchregular expression.user— Match usernames against thesearchregular expression.ip— Match IP addresses against thesearchregular expression.package— Match hosting plans (packages) against thesearchregular expression.
If you do not specify a value for both the searchtype and search parameters, the function does not use the searchtype value.
The reseller to query.
If you do not specify a value, the function queries all users.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/showbw
- A server running WHM.
https://whm-server.tld:2087/json-api/showbw
- 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/showbw?month=12&search=ownername&searchtype=owner&showres=reseller_user&year=2019'{ "data": { "acct": [ … ], "month": 12, "reseller": "root", "totalused": 352, "year": 2019 }, "metadata": { "command": "showbw", "reason": "OK", "result": 1, "version": 1 } }