Last modified November 7, 2024

listBackupForAccounts

This function will list all Accounts with their most recent Backup based on given filters. See below for the filters you may pass.
Parameters
Parameter name Type Description Possible Values Example
type Integer REQUIRED The Backup Type.
  • 1 : Accounts
  • 2 : Directories
  • 3 : JB Config
type=1
contains Integer REQUIRED Integer value indicating the contains. Please see the Backup Contains below for a all available contains values. contains=511
Returns
Parameter name Type Description Data
accounts List [] List of all Accounts and their selected backup.
Key Type Description
account_id String The Account ID of the Account being listed.
account String The name matching the Account ID.
backup Backup Object The most recent backup object for the given account.
total_backups Integer The total number of backups the given account has available.

Example Call JETAPI

jetbackup5api -F listBackupForAccounts -D "type=1&contains=511&account_id={$ACCOUNT_ID}"
success: 1 message: system: version: 5.3.3 version_panel: 5.3.3 tier: EDGE type: cPanel retry_ms: 0 disableui: dr: agreement_panel: agreement: licenseIssue: data: accounts: 0: account_id: 6503d48bfc45b1addf0a9636 account: user backup: _id: 6504e935bad4bea7340c75ea parent_id: 6504e6cabad4bea7340c75d3 account_id: 6503d48bfc45b1addf0a9636 destination: 6503eec8ebbf07708d06f1d2 destination_name: s3 name: user created: 2023-09-15T23:20:42+00:00 path: config backup_type: 1 backup_contains: 1 account: user account_data: _id: 6503d48bfc45b1addf0a9636 username: user owner: root owner_id: 6503d48bfc45b1addf0a9632 package: default suspended: reseller: root: size: 81069 params: backup_structure: 1 notes: location: safety: deleted: lock: lock_ttl: damaged: disabled: schedules: 0: 8 hidden: encrypted: encryption_id: encryption_key_required: encryption_key_exists: 1 total_backups: 3

Example Call HTTP

https://hostname.example.com:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=listBackupForAccounts&type=1&contains=511&account_id={$ACCOUNT_ID}