WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The destination settings.
An error message that explains why the backup is disabled.
Whether to disable the backup destination.
1— Disable the destination.0— Enable the destination.
Note:
If you do not set this parameter, the system retains the current setting.
A new name for the backup destination.
Note:
If you do not set this parameter, the system retains the current setting.
The type of backup destination.
Note:
If you do not set this parameter, the system retains the current setting.
Select a backup destination from the following menu to view its optional parameters:
- AmazonS3
- Backblaze
- Custom
- FTP
- GoogleDrive
- Local
- Rsync
- S3Compatible
- SFTP
- WebDAV
Whether to upload system backups.
1— Upload.0— Do not upload.
Note:
If you do not set this parameter, the system retains the current setting.
Whether to use this transport only for logs.
1— This destination will be skipped for regular backups.0— Both log and regular backups will be uploaded.
This setting defaults to 0. The only time log files get their own backup is via scripts/remote_log_transfer
Note:
If you do not set this parameter, the system retains the current setting.
The path to the backups directory, relative to the root directory, on the remote server.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_set
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_destination_set
- 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/backup_destination_set \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'disable_reason=Could not list files in destination: example' \
-d disabled=0 \
-d id=0W1ei2rd3A4lI5sT6he7Be8st \
-d name=destination_name \
-d type=AmazonS3 \
-d upload_system_backup=1 \
-d only_used_for_logs=1 \
-d aws_access_key_id=s123456789 \
-d bucket=ChockFullOfNuts \
-d folder=subfolder \
-d password=123456luggage \
-d timeout=300{ "metadata": { "command": "backup_destination_set", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_validate
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_destination_validate
- 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/backup_destination_validate?disableonfail=1&id=0W1ei2rd3A4lI5sT6he7Be8st'{ "data": { "id": "0W1ei2rd3A4lI5sT6he7Be8st" }, "metadata": { "command": "backup_destination_validate", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_does_client_id_have_google_credentials
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_does_client_id_have_google_credentials
- 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/backup_does_client_id_have_google_credentials?client_id=aBcdeFgHIjK123'{ "data": { "exists": 1 }, "metadata": { "command": "backup_does_client_id_have_google_credentials", "reason": "OK", "result": 1, "version": 1 } }