Last modified November 7, 2024

addQueueItems

This function lets you Queue Backup Items for restore or download.

To Queue a Backup Job, please execute the runBackupJobManually API call. To Queue a Reindex for a Destination, please execute the reindexDestination API call.

Parameter name Type Description Possible values Example
type Integer REQUIRED The Queue Group Type.
  • 1: *Backup Queue
  • 2: Restore Queue
  • 4: Download Queue
  • 8: *Reindex Queue * incompatible with API command
type=2
snapshot_id String REQUIRED for Restore(2) or Download(4) Queue Types The Parent ID of the snapshot items.   snapshot_id=607f602a47fdfc271457147a
items List [] Optional for Restore(2) or Download(4) Queue Types List of Backup Item Object IDs you would like to add to the queue.   items[]=607f602a47fdfc271457147a
options List [] List of options you want to execute with the Queue Item(s). This parameter is only available for Restore Queue Type (2). For boolean type options, value is set to false by default.
  • terminate (boolean): true | false
  • suspend (boolean): true | false
  • merge (boolean): true | false
  • reseller (boolean): true | false
  • owner (string)
  • package (string)
options[merge]=true&options[owner]=root&options[package]=default

Example Call JETAPI

jetbackup5api -F addQueueItems -D "type=2&snapshot_id={$PARENT_ID_OF_BACKUP}"
jetbackup5api -F addQueueItems -D "type=4&items[0]{$BACKUP_ITEM_ID1}&items[1]={$BACKUP_ITEM_ID2}"
jetbackup5api -F addQueueItems -D "type=2&items[]={$BACKUP_ITEM_ID}&files[{$BACKUP_ITEM_ID}][{/$FILE}]=File"
success: 1
message: Items added to the queue Successfully
system:
  version: 5.3.3
  version_panel: 5.3.3
  tier: EDGE
  type: cPanel
  retry_ms: 0
  disableui:
  dr:
  agreement_panel:
  agreement:
  licenseIssue:
data:
  _id: 6503ebd682762fb213093772
  owner: 6503eba4c6477f48c309376f
  owner_name: example
  created: 2023-09-15T05:29:58+00:00
  started: 2023-09-15T05:29:58+00:00
  ended:
  type: 4
  items: 1
  items_completed: 0
  finalize:
  status: 1
  can_rerun:
  rerun_failed:
  log_id: 6503ebd65f147c7ca3068012
  status_time: 2023-09-15T05:29:58+00:00
  progress:
    _id: 6503ebd682762fb213093774
    group_id: 6503ebd682762fb213093772
    item_id: 6503ebd682762fb213093773
    name:
    total: 0
    completed: 0
    subtotal: 0
    subcompleted: 0
    name_files:
    total_files: 0
    completed_files: 0
    percentage: 0
    percentage_sub: 0
    percentage_files: 0
  execution_time: 0
  actual_time: 0
  log_file: /usr/local/jetapps/var/log/jetbackup5/queue/4_6503ebd682762fb213093772.log
  log_contents:
  data:
    account: example
    priority: 50

Example Call HTTP

https://hostname.example.com:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=addQueueItems&type=4&snapshot_id={$PARENT_ID_OF_BACKUP}

https://hostname.example.com:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=addQueueItems&type=4&items[0]={$BACKUP_ITEM_ID1}&items[1]={$BACKUP_ITEM_ID2}