WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
Remove the connected application from the server. This only removes the connection information from the configuration file. It does not clean up any allocated resources, such as API tokens and public/private keys. Any tokens or keys need to be removed from the system separately.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_connected_application
- A server running WHM.
https://whm-server.tld:2087/json-api/remove_connected_application
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_connected_application?name=application-1'{ "metadata": { "command": "remove_connected_application", "reason": "OK", "result": 1, "version": 1 } }
Data associated with the connected application. There are predefined elements related to specific security scenarios, but additional data may be stored here as well.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/save_connected_application
- A server running WHM.
https://whm-server.tld:2087/json-api/save_connected_application
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/save_connected_application \
-H 'Content-Type: application/json' \
-d '{
"data": {
"jwt": {
"callback_url": "https://application-1.com/api/si/servers/registrations/callback",
"challenge": "ddd13a92-d55e-4818-a960-9776ede6cd74",
"email": "john.doe@email.example",
"exp": 1401912171,
"ips": [
"1.1.1.1",
"2.2.2.2"
],
"iss": "https://application-1.com",
"iss_desc": "Sample application",
"name": "John Doe",
"redirect_url": "https://application-1/redirect",
"scope": [
"admin:users",
"admin:resellers",
"admin:domains"
],
"state": "xyz"
},
"private_key": "FEF6253E6A122532430D",
"public_key": "AAF6253E6A1225324305623EE",
"token_name": "Application 1 API Token",
"property1": null,
"property2": null
},
"name": "application-1"
}'{ "metadata": { "command": "save_connected_application", "reason": "OK", "result": 1, "version": 1 } }