UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function restores an account's files.
Important:
When the File Storage role is disabled, the system also disables this function.
Note:
You must use the backup parameter when you call this function in one of the following formats:
- As part of a
multipart/form-datarequest body to upload and restore a backup file to the server. For more information about this structure, read Mozilla's POST Method documentation. - As a query parameter to restore an existing file on the server.
The backup file to restore.
Important:
Only pass this parameter to restore backup files that already exist on the server.
Note:
To restore multiple backup files, increment the parameter name. For example: backup-1, backup-2, and backup-3.
The directory to which to restore the file. The default is the user's home directory.
The maximum number of seconds to try to restore the file.
0- The system will not time out the file restoration.
The backup file to upload and restore.
Important:
- Only pass this parameter to upload files that don't already exist on the server.
- You can't pass this parameter on the command line.
Note:
To upload and restore multiple backup files, increment the parameter name. For example: backup-1, backup-2, and backup-3.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Backup/restore_files
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Backup/restore_files
- 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/cpanel.openapi/Backup/restore_files?backup=string&directory=%2Fhome%2Fuser%2Fexample&timeout=7200&verbose=1' \
-H 'Content-Type: multipart/form-data' \
-F backup=string{ "apiversion": 3, "func": "restore_files", "module": "Backup", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists all of the backup files and directories in the user's home directory.
Important:
When you disable the File Storage role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Restore/directory_listing
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Restore/directory_listing
- 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/cpanel.openapi/Restore/directory_listing?path=%2Fpublic_html%2F'{ "apiversion": 3, "func": "directory_listing", "module": "Restore", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function lists a reseller's users that have existing backup metadata.
Note:
When you disable the File Storage role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Restore/get_users
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Restore/get_users
- 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/cpanel.openapi/Restore/get_users{ "apiversion": 3, "func": "get_users", "module": "Restore", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }