Configuring Started/Paused Status Using REST API
Learn how to configure job status using the DryvIQ REST API.
Table of Contents
Overview
DryvIQ supports creating jobs with a predefined “start” status through REST API configuration. You can create jobs with manual schedules that execute immediately or auto schedules that are paused until a user intervenes. Based on the chosen schedule method, DryvIQ offers two options for this setting: start and paused.
Job JSON Example
Started
In the DryvIQ Platform user interface, the started status corresponds to the "Save and Run Job" option for manual jobs. This automatically starts jobs with a manual schedule. After initial execution, the manual schedule will continue to be preserved.
{
"name": "Start Job - Manual - As started",
"kind": "transfer",
"transfer": {
"audit_level": "trace",
"transfer_type": "copy",
"source": {
"connection": {
"id": "{{cloud_connection_source}}"
},
"target": {
"path": "/sourcePath"
}
},
"destination": {
"connection": {
"id": "{{cloud_connection_destination}}"
},
"target": {
"path": "/destinationPath"
}
}
},
"schedule": {
"mode": "manual"
},
"status": "start"
}
Paused
In the DryvIQ Platform user interface, a paused status corresponds to the "Start as Paused" for auto-schedule. This will pause the initial execution of the job until the user manually triggers it. Subsequent runs will continue on the regular specified schedule. The paused option is not preserved when making changes to the schedule. Should preservation be desired, each change will require this option.
When a job schedule of manual is configured, "paused" is not a valid option; only "start." A manual job does not have a true schedule
{
"name": "Start Job - Auto- As paused",
"kind": "transfer",
"transfer": {
"audit_level": "trace",
"transfer_type": "copy",
"source": {
"connection": {
"id": "{{cloud_connection_source}}"
},
"target": {
"path": "/sourcePath"
}
},
"destination": {
"connection": {
"id": "{{cloud_connection_destination}}"
},
"target": {
"path": "/destinationPath"
}
}
},
"schedule": {
"mode": "auto"
},
"status": "paused"
}
PATCH/Modify Job
The start/paused settings can also be applied to existing jobs using the PATCH options available through the REST API.
JSON Example
PATCH an existing job when changing the schedule.
{
"kind": "transfer",
"schedule": {
"mode": "auto/manual"
},
"status": "paused/start"
}