Last modified November 7, 2024

listBackups

This function will list all Backups given the Backup Type/Backup Contains/Account ID (optional).
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 Backup Object Contains. Please see the Backup Contains below for a all available contains values. contains=511
account_id String REQUIRED Only for Backup Type Accounts. The Account ID whose backups you want to list. To list directory backups, you will replace the Account ID with the Backup Job ID. See listAccounts to find the account_id. See listBackupJobs to find the Backup Job ID. account_id=60898b7f0510b07a0833d136

Example Call JETAPI

jetbackup5api -F listBackups -D "type=1&contains=511&account_id={$ACCOUNT_ID}"
jetbackup5api -F listBackups -D "type=2&contains=3&account_id={$BACKUP_JOB_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:
backups:
        0:
        _id: 6503f05fedc7b9f4520a967a
        parent_id: 6503ef22edc7b9f4520a9643
        account_id: 6503d48bfc45b1addf0a9636
        destination: 6503eec8ebbf07708d06f1d2
        destination_name: s3
        name: user
        created: 2023-09-15T05:44:02+00:00
        path:
        backup_type: 1
        backup_contains: 511
        account: user
        account_data:
                _id: 6503d48bfc45b1addf0a9636
                username: user
                owner: root
                owner_id: 6503d48bfc45b1addf0a9632
                package: default
                suspended:
                reseller:
                root:
        size: 7813234243
        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

Example Call HTTP

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