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 email filters.
Important:
When the Receive Mail 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. - As a query parameter to restore an existing file on the server.
The email filter file to restore.
Important:
Only pass this parameter to restore email filter files that already exist on the server.
Note:
To restore multiple email filter files, increment the parameter name. For example: backup-1, backup-2, and backup-3.
The maximum number of seconds to try to restore the file.
0- The system will not time out the file restoration.
The email filter 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 multiple email filter files, increment the parameter name. For example:
backup-1,backup-2, andbackup-3. - Pass this file in a multipart/form-data structure.
- For more information about this structure, read Mozilla's POST Method documentation.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Backup/restore_email_filters
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Backup/restore_email_filters
- 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_email_filters?backup=string&timeout=3600&verbose=1' \
-H 'Content-Type: multipart/form-data' \
-F backup=string{ "apiversion": 3, "func": "restore_email_filters", "module": "Backup", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function restores an account's email forwarders.
Important:
When the Receive Mail 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 email forwarder file to restore.
Important:
Only pass this parameter to restore email forwarder files that already exist on the server.
Note:
To restore multiple email filter files, increment the parameter name. For example: backup-1, backup-2, and backup-3.
The maximum number of seconds to try to restore the file.
0- The system will not time out the file restoration.
The email forwarder 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 multiple email filter 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_email_forwarders
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Backup/restore_email_forwarders
- 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_email_forwarders?backup=string&timeout=3600&verbose=1' \
-H 'Content-Type: multipart/form-data' \
-F backup=string{ "apiversion": 3, "func": "restore_email_forwarders", "module": "Backup", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
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 } }