WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The application key's name.
Note:
This parameter is only valid for the Backblaze backup type.
The application key ID that authenticates the Backblaze B2 account.
Note:
This parameter is only valid for the Backblaze backup type.
The authorization type.
passwordkey
Note:
This parameter is only valid for the following backup types:
SFTPRsync
The Amazon S3™ Access Key ID.
Note:
This parameter is only valid for the following backup types:
AmazonS3S3Compatible
The Amazon S3™ bucket.
Note:
This parameter is only valid for the following backup types:
AmazonS3S3Compatible
The bucket's ID string.
Note:
This parameter is only valid for the Backblaze backup type.
The bucket's name.
Note:
This parameter is only valid for the Backblaze backup type.
The Google Drive client ID.
Note:
This parameter is only valid for the GoogleDrive backup type.
The Google Drive client secret.
Note:
This parameter is only valid for the GoogleDrive backup type.
Whether to disable the backup destination.
1— Disable the backup destination.0— Enable the backup destination.
The remote server's hostname.
Note:
This parameter is only valid for the following backup types:
CustomFTPSFTPRsyncWebDAVS3Compatible
The remote server account's password or secret access key.
Note:
This parameter is only valid for the following backup types:
AmazonS3CustomFTPSFTPRsyncWebDAVS3Compatible
The absolute file path to the user-supplied transport solution script.
Note:
This parameter is only valid for the Custom backup type.
The type of backup destination.
CustomFTPLocalSFTPWebDAVAmazonS3RsyncGoogleDriveS3CompatibleBackblaze
Note:
This value determines which parameters you can use with the function.
Warning:
Use any of these encrypted connections to transfer system backup files:
- Amazon S3™
- Backblaze
- GoogleDrive
- Rsync
- S3 Compatible
- SFTP
- WebDAV with SSL enabled
The remote server account's username.
Note:
This parameter is only valid for the following backup types:
CustomFTPSFTPRsyncWebDAV
The path to the backups directory on the remote server.
Note:
This parameter is only valid for the following backup types:
AmazonS3GoogleDriveS3Compatible
Whether the path is mounted.
1— The path is mounted.0— The path is not mounted.
Note:
This parameter is only valid for the Local backup type.
Whether to fail the backup attempt if the mount fails.
1— Fail the backup attempt.0— Do not fail the backup attempt.
Note:
This parameter is only valid for the Local backup type.
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
Whether to use passive FTP.
1— Use passive FTP.0— Use active FTP.
Note:
This parameter is only valid for the FTP backup type.
The private key file's passphrase, if the authtype parameter is the key value.
Note:
This parameter is only valid for the following backup types:
SFTPRsync
The path to the backups directory on the remote server.
- This parameter is required for the
Localbackup type. - If you do not use this parameter, the system will not set a value.
Note:
This parameter is only valid for the following backup types:
BackblazeCustomLocalFTPSFTPRsyncWebDAV
The TCP port to use.
Note:
- This parameter defaults to the standard port used by the queried backup
typeparameter. - This parameter is only valid for the following backup types:
FTPSFTPRsyncWebDAV
The file path to the private key file, if the authtype parameter is the key value.
Note:
This parameter is only valid for the following backup types:
SFTPRsync
Whether to use SSL.
1— Use SSL.0— Do not use SSL.
Note:
This parameter is only valid for the WebDAV backup type.
The session timeout, measured in seconds.
Note:
- This parameter is not valid for the
Localbackuptypeparameter. - The default value depends on the
typeparameter's value.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_add
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_destination_add
- 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_add?application_key=A123b45CD678e9&application_key_id=12a345B678c9&authtype=password&aws_access_key_id=AKIAYLWMPOZZJCERC28Q&bucket=ChockFullOfNuts&bucket_id=a12b34cd5678e9f&bucket_name=ChockFullOfNuts&client_id=aBcdeFgHIjK123&client_secret=aBcde123FgHIjK456&disabled=0&host=backups.example.com&name=destination_name&password=123456luggage&script=%2Fhome%2Fbackups%2Fbeammeupscotty.pl&type=Local&username=username&folder=subfolder&mount=1&no_mount_fail=1&only_used_for_logs=1&passive=1&passphrase=123456luggage&path=backups&port=21&privatekey=%2Fhome%2Fbackups%2Fkey&ssl=1&timeout=30&upload_system_backup=1'{ "data": { "id": "PhAxIoLSdIkCI40q9vWS4BYy" }, "metadata": { "command": "backup_destination_add", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_delete
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_destination_delete
- 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_delete?id=11111111'{ "metadata": { "command": "backup_destination_delete", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/backup_destination_get
- A server running WHM.
https://whm-server.tld:2087/json-api/backup_destination_get
- 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_get?id=0W1ei2rd3A4lI5sT6he7Be8st'{ "data": { "aws_access_key_id": "access-key-id", "bucket": "s3-bucket-brigade", "disabled": 0, "folder": "", "id": "Sr1ThYOnnBIXUupTcSBYQywk", "name": "Amazon S3", "timeout": 30, "type": "AmazonS3", "upload_system_backup": 0 }, "metadata": { "command": "backup_destination_get", "reason": "OK", "result": 1, "version": 1 } }