Last modified November 7, 2024

listAccountsByFilters

This function will list a single Backup for account(s) matching the given Filters.
Parameter name Type Description Possible values Example
filters[]   Optional Include a Filters list to return account backup matching the specified criteria. Filter Options are detailed below and passed as filters[parameter]=    
accounts List [] Return only the specified account(s).   filters[accounts][0]=account123&filters[accounts][1]=account234
date_start, date_end String Include Backups after or before the specified date/time in ISO-8601 format.   filters[date_start]=2022-07-31T17:00:18.484Z&filters[date_end]=2022-08-16T04:55:18.433Z
destination String Only include Backups on the destination ID specified.   filters[destination]=62e968a582ff8e55e86b2642
backup_structure Integer The backup structure. For more information, see Backup Structure 1, 2, 4 filters[backup_structure]=1
backup_contains Integer The backup contains integer value. For more information, see Backup Contains   filters[backup_contains]=511
owned_by String Return accounts owned by the reseller.   filters[owned_by]=root
tags String Return accounts with the specified account tag.   filters[tags]=Tag1
account_status Integer Filter by the account active status.
  • 0 (Any)
  • 1 (Only Active)
  • 2 (Only Orphan)
filters[account_status]=0
account_suspended Integer Filter by account suspension status.
  • 0 (Any)
  • 1 (Unsuspended)
  • 2 (Suspended)
filters[account_suspended]=0
locked Integer Return locked backups.
  • 0 (Any)
  • 1 (Encrypted)
  • 2 (Unencrypted)
filters[locked]=1
encrypted Integer Return encrypted backups.
  • 0 (Any)
  • 1 (Encrypted)
  • 2 (Unencrypted)
filters[encrypted]=1
show_oldest Boolean Set to true to return the oldest backup. Default is to return the newest backup.
  • 0 (Sort by Newest)
  • 1 (Sort by Oldest)
filters[show_oldest]=0

This API call returns queue group objects. To view the parameters returned by this function, click on Queue Group Object.

Example Call JETAPI

jetbackup5api -F listAccountsByFilters -D "filters[account_status]=2&filters[account_suspended]=0&filters[locked]=0&filters[backup_structure]=0&filters[show_oldest]=0"
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
        uuid: 8525c64376e64e77771c2ffbb103a4fe129a7cc9
        username: user
        nickname:
        created: 2023-09-15T03:50:35+00:00
        domain:
        owner: root
        owner_id: 6503d48bfc45b1addf0a9632
        owner_nickname: root
        owners:
          0: root
        owners_id:
          0: 6503d48bfc45b1addf0a9632
        homedir: /home/user
        ip:
        package: default
        packages:
        root:
        reseller:
        suspended:
        login_only:
        orphan:
        active: 1
        virtual:
        email: [email protected]
        max_snapshots: 5
        backup_quota:
        backup_stats:
          511: 4
          1: 5
          2: 5
          4: 16
          128: 60
          256: 15
          8: 4
          16: 4
          32: 25
          64: 20
        tags:
        backup_type: 0
        encryption_key_type: 0
        privacy: 0
        queue_priority: 6503d489d31a5adeec0952f1
        last_active:
        secret_key:
        assignable_accounts: 0
        quota:
          disk_total: -1
          disk_usage: 7854882816
          disk_free: -1
          inode_usage: 9665
      snapshot:
        name: snap.1
        created: 2023-09-21T19:12:51+00:00
        path: jetbackup_1_1_6504c79fd4b57d536c05bbe2/user_6503d48bfc45b1addf0a9636
        destination: 6503eec8ebbf07708d06f1d2
        backup_type: 1
        backup_contains: 511
        backup_structure: 1
        account: user
        account_id: 6503d48bfc45b1addf0a9636
        account_active: 1
        account_orphan:
        account_data:
          _id: 6503d48bfc45b1addf0a9636
          username: user
          owner: root
          owner_id: 6503d48bfc45b1addf0a9632
          package: default
          suspended:
          reseller:
          root:
        safety:
        location:
        temp_snap:
        deleted:
        damaged:
        lock:
        lock_ttl:
        encrypted:
        hidden:
        notes:
        size: 0
        schedule_type:
          0: 8

Example Call HTTP

https://HOST_NAME:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=listAccountsByFilters&filters[account_status]=2&filters[account_suspended]=0&filters[locked]=0&filters[backup_structure]=0&filters[show_oldest]=0