- Created by Documentation, last modified on Jul 03, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function retrieves a backup destination's configuration settings.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/backup_destination_get?api.version=1&id=0W1ei2rd3A4lI5sT6he7Be8st
https://hostname.example.com:2087/cpsess##########/xml-api/backup_destination_get?api.version=1&id=0W1ei2rd3A4lI5sT6he7Be8st
whmapi1 backup_destination_get id=0W1ei2rd3A4lI5sT6he7Be8st
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "data": { "disabled": "0", "local_subdir": "/", "mount": "0", "name": "destination name", "path": "/mylocaldir", "we_mounted_it": "0", "type": "Local", "id": "0W1ei2rd3A4lI5sT6he7Be8st", "no_mount_fail": "0" }, "metadata": { "version": 1, "reason": "OK", "result": 1, "command": "backup_destination_get" } }
<result> <data> <disabled>0</disabled> <local_subdir>/</local_subdir> <mount>0</mount> <name>destination name</name> <path>/mylocaldir</path> <we_mounted_it>0</we_mounted_it> <type>Local</type> <id>0W1ei2rd3A4lI5sT6he7Be8st</id> <no_mount_fail>0</no_mount_fail> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>backup_destination_get</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
id | string | Required The backup destination's ID. | A valid string. | 0W1ei2rd3A4lI5sT6he7Be8st |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
name | string | The backup destination's name. | A valid string. | destination |
type | string | The type of transport. Note: The |
|
|
disabled | Boolean | Whether to disable the backup destination. |
| 0 |
disable_reason | string | An error message that explains why the backup is disabled. | A valid string. | Could not list files in destination: example |
Additional AmazonS3
returns
Note:
The AmazonS3
type is available in cPanel & WHM version 11.42 and later.
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
folder | string | The path to the backups directory. | A valid file path, relative to the root directory. | subfolder |
bucket | string | The Amazon S3™ bucket. | A valid string. | ChockFullOfNuts |
aws_access_key_id | string | The Amazon S3 Access Key ID. | A valid string. | 123456789 |
timeout | string | The session timeout. | A positive integer, in seconds. | 360 |
Additional Backblaze
returns
Note:
We added the Backblaze
type in cPanel & WHM version 78.
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
application_key | string | The application key's name. | A valid string. | A123b45CD678e9 |
application_key_id | string | The application key ID that authenticates the Backblaze B2 account. | A valid string. | 12a345B678c9 |
bucket_id | string | The bucket's ID string. | A valid string. | a12b34cd5678e9f |
bucket_name | string | The bucket's name. | A valid string. | ChockFullOfNuts |
path | string | The path to the backups directory on the remote server. | A valid file path. | backups |
timeout | integer | The session timeout. | A positive integer, measured in seconds. | 180 |
Additional custom
returns
Returns | Type | Description | Possible values | Example |
---|---|---|---|---|
script | string | The name of the user-supplied transport solution script. | A valid absolute file path. | /home/backups/beammeupscotty.pl
|
host | string | The remote server's hostname. | A valid hostname. |
backups.example.com |
path | string | The path to the remote server's backups directory. | A valid file path. | /backups |
timeout | string | The session timeout. | A positive integer, in seconds. | 360 |
username | string | The remote server account's username. | A valid username. | username |
Additional FTP
returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
host | string | The remote server's hostname. | A valid hostname. | backups.example.com |
port | integer | The remote server's FTP port. | A positive integer. | 21 |
path | string | The path to the remote server's backups directory. | A valid file path. | /backups |
passive | Boolean | Whether the remote server uses passive FTP. |
| 1 |
timeout | string | The session timeout. | A positive integer, in seconds. | 360 |
username | string | The remote server account's username. | A valid username. | username |
Additional local
returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
mount | Boolean | Whether the path is mounted. |
| 0 |
path | string | The path to the backups directory. | A valid absolute file path. | /home/backups |
no_mount_fail | Boolean | Whether the backup attempt will fail if the mount fails. |
| 0 |
Additional sftp
returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
host | string | The remote server's hostname. | A valid hostname. | backups.example.com |
port | integer | The remote server's FTP port. | A positive integer. | 21 |
path | string | The path to the remote server's backups directory. | A valid file path. | /backups |
timeout | string | The session timeout. | A positive integer, in seconds. | 360 |
username | string | The remote server account's username. | A valid username. | username |
| string | The authorization type. |
|
|
privatekey | string | If the authtype return's value is key , the the private key file's path. | A valid absolute file path. | /home/backups/key |
Additional webdav
returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
host | string | The remote server's hostname. | A valid hostname. | backups.example.com |
port | integer | The remote server's FTP port. | A positive integer. | 21 |
path | string | The path to the remote server's backups directory. | A valid file path. | /backups |
ssl | Boolean | Whether the remote server uses SSL. |
| 1 |
timeout | string | The session timeout. | A positive integer, in seconds. | 360 |
username | string | The remote server account's username. | A valid username. | username |
Function information
API Version:
Available in:
WHM 11.38+
Methods:
GET, POST
Required Parameters:
id
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Functions - toggle_user_backup_state — This function enables or disables legacy backups for a user.
-
Page:WHM API 1 Functions - backup_user_list — This function lists users with a backup file on a specified date.
-
Page:WHM API 1 Functions - backup_date_list — This function lists all dates that contain backup files.
-
Page:WHM API 1 Functions - list_cparchive_files — This function lists all available
cparchive
files. -
Page:WHM API 1 Functions - backup_skip_users_all_status — This function checks each user's backup configuration status while the
backup_skip_users_all
function runs.