WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function lists all active and open support tickets from the cPanel Customer Portal.
Note:
This function is not available through the command line. You must call it as a request body.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ticket_list
- A server running WHM.
https://whm-server.tld:2087/json-api/ticket_list
- 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/ticket_list?server_num=2&ticket_id=999999999&ssh_username=username'{ "data": { "auths": [ … ], "non_fatals": [] }, "metadata": { "command": "ticket_list", "reason": "OK", "result": 1, "version": 1 } }
Request
This function records a user's acceptance of the Technical Support Agreement (TSA). The cPanel Customer Portal stores each record with the user's login, the date and time, and the TSA's version.
Note:
This function is not available through the command line. You must call it as a request body.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ticket_update_service_agreement_approval
- A server running WHM.
https://whm-server.tld:2087/json-api/ticket_update_service_agreement_approval
- 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/ticket_update_service_agreement_approval?version=2020-04.v01.TSUPPORT'{ "metadata": { "command": "ticket_update_service_agreement_approval", "reason": "OK", "result": 1, "version": 1 } }
Request
This function validates the OAuth2 code from the cPanel Customer Portal. After the function validates the token, the system stores it on the current session.
Note:
This function is not available through the command line. You must call it as a request body.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/ticket_validate_oauth2_code
- A server running WHM.
https://whm-server.tld:2087/json-api/ticket_validate_oauth2_code
- 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/ticket_validate_oauth2_code?code=84b1a729-63e3-11e6-a0fb-bfcf357fd76d&redirect_uri=https%3A%2F%2Fhostname.example.com%3A2087%2F'{ "metadata": { "command": "ticket_validate_oauth2_code", "reason": "OK", "result": 1, "version": 1 } }