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/get_users_and_domains_with_backup_metadata
- A server running WHM.
https://whm-server.tld:2087/json-api/get_users_and_domains_with_backup_metadata
- 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/get_users_and_domains_with_backup_metadata{ "data": { "username": "example.com", "username2": "example.net", "username3": "example.org" }, "metadata": { "command": "get_users_and_domains_with_backup_metadata", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_users_with_backup_metadata
- A server running WHM.
https://whm-server.tld:2087/json-api/get_users_with_backup_metadata
- 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/get_users_with_backup_metadata{ "data": { "accounts": [ … ] }, "metadata": { "command": "get_users_with_backup_metadata", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists all available cparchive files.
Note:
MM.DD.YYYYrepresents the file's date in month, date, and year format.HH-MM-SSrepresents the file's timestamp in hour, minute, and second format.
The function checks the following filenames, where USER represents the cPanel account's filusername::
cpmove-USERcpmove-USER.tarcpmove-USER.tar.gzUSER.tarUSER.tar.gzbackup-{MM.DD.YYYY}{HH-MM-SS}{USER}.tarbackup-{MM.DD.YYYY}{HH-MM-SS}{USER}.tar.gz
The function checks for these filenames in the following locations:
/home/home2/home3/root/usr/usr/home/web
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_cparchive_files
- A server running WHM.
https://whm-server.tld:2087/json-api/list_cparchive_files
- 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/list_cparchive_files{ "data": { "quickrestore_files": [ … ] }, "metadata": { "command": "list_cparchive_files", "reason": "OK", "result": 1, "version": 1 } }