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/send_test_posturl
- A server running WHM.
https://whm-server.tld:2087/json-api/send_test_posturl
- 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/send_test_posturl?url=Click+to+view...https%253A%252F%252Fwww.example.com%252Fevents.cgi%253Fapikey%253D12345%2526user%253Dusername*password%253D12345luggage'{ "data": { "message_id": "554d2cbd-efe61da3cacb" }, "metadata": { "command": "send_test_posturl", "reason": "OK", "result": 1, "version": 1 } }
Request
This function uses the specified access token to send a test Pushbullet™ note. The function automatically generates a message title and body, and it includes a unique string in the test message. When the test message returns, the system searches for the ID string and returns it.
If the function does not detect the correct ID string in the returned message, the function fails. You can also review the user's Pushbullet channel history to confirm that the server sent and received the message.
The test's success or failure depends on various conditions. For example:
- Valid access token.
- Network configuration.
- Service outages.
- External server rate limit.
The Pushbullet token to use.
Note:
- To access your Pushbullet token, navigate to Pushbullet's My Account page. It will appear under the Access Token heading.
- This is confidential information that your server sends via a secure channel.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/send_test_pushbullet_note
- A server running WHM.
https://whm-server.tld:2087/json-api/send_test_pushbullet_note
- 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/send_test_pushbullet_note?access_token=a1b2c3d4e5f6g7h8i9j0'{ "data": { "message_id": "554d2cbd-efe61da3cacb", "payload": { … } }, "metadata": { "command": "send_test_pushbullet_note", "reason": "OK", "result": 1, "version": 1 } }
Request
This function sets the importance level of an application event for WHM's Contact Manager interface (WHM >> Home >> Server Contacts >> Contact Manager).
For a list of available modules, use the WHM API 1 get_all_contact_importances function.
Note:
The system creates a notification setting for the application's events if one does not already exist.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_application_contact_event_importance
- A server running WHM.
https://whm-server.tld:2087/json-api/set_application_contact_event_importance
- 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/set_application_contact_event_importance?app=Check&event=SecurityAdvisorStateChange&importance=Disabled'{ "metadata": { "command": "set_application_contact_event_importance", "reason": "OK", "result": 1, "version": 1 } }