WHM API.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
A server running WHM.
https://{host}:{port}/json-api/
Query
Whether to display only private keys.
1— Display only private keys.0— Display all keys.
Default 1
Enum01
Example: private=0
Whether to include private key text.
1— Include private key text.0— Do not include private key text.
Default 1
Enum01
Example: private_texts=0
Whether to display only public keys.
1— Display only public keys.0— Display all keys.
Enum01
Example: public=0
Whether to include public key text.
1— Include public key text.0— Do not include public key text.
Default 0
Enum01
Example: public_texts=0
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/listsshkeys
- A server running WHM.
https://whm-server.tld:2087/json-api/listsshkeys
- 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/listsshkeys?files=TestKey&private=0&private_texts=0&public=0&public_texts=0&sync_authorized=0'Response
application/json
{ "data": { "keys": [ … ] }, "metadata": { "command": "listsshkeys", "reason": "OK", "result": 1, "version": 1 } }
Request
This function regenerates or retrieves a user's access hash. For more information about access hashes, read our Remote Access Key documentation.
Warning:
We deprecated this function. We strongly suggest that you use the WHM API 1 api_token_create function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/accesshash
- A server running WHM.
https://whm-server.tld:2087/json-api/accesshash
- 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/accesshash?generate=0&user=root'Response
application/json
{ "data": { "accesshash": "cb523f89e9a31123fde7c6f93b580ac05bf00a2804d4febe6667ab9917a14baa1c4914da209bf55c862999ea51983a117a4d2f238140200b1e5b270b94b2c52492747e5ebfdeddb8abf4e1b0c428c6c68b701b48e13dbe39da49450e7a8e5422e18ab3b6290b5b6556bd82ee21d9c1103e7a51d1e94f2ac0c4dcc6a10954b8634c6db16a541660c3c89e10254f05583f4167adfcff7781090ea930647b46e5b981f3e16c7723ca4e12dc4b54a778dc66a28df73632a0d3a8e01e207b9fd6b555b72936a903af014f30061d712d736176a87fb5333c5b90cf0bb4f3c6735f2b45929ac79fb1184045a5f4c20bfcc553f5ab760eec077c0d6096e54d02724201281e441e7b0f642370a63f61c68766e224c8510bc32b0316780660c34352cbfeeccfee9d4f02e20ba7b664d3e84e9419ca386c41df07613f8af252aba8626a8b54796bbe616f41af1e6f11a3d0327f7608d23666fca64e6ebe899f7479a5fb0aea008b1e7a41890c9c58037682450febf91b7aa1c080d31d834b0ae466f8533df838ab271b26a7fb7de96402ad4a818d6b786af92c38414d2ef6c88deb7c685a1e60c3cbcfbf20cf6d2a00dd50d2be9bc1824d91284ec6842dd7db42564dfc3ecb75c1a9bc775c45c5f08784b9e2885c2d" }, "metadata": { "command": "accesshash", "reason": "OK", "result": 1, "version": 1 } }