...
Code Block |
---|
curl -X POST -d update_job.data \
-H "Content-Type: application/json" \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/jobs/[IDJob] |
Update job status
The following table provides the URI and methods that can be used to update the job status.
Data fields
Field | Value type | Mandatory | Description | Example |
---|
IDEntity | string | | ID of the entity that you are changing the status for (e.g. IDJob) | 7090fad1-c4da-4488-9ceb-55ee9847edcc |
Entity | string | | Entity type that the status is being updated for (Accepted Entity types: "JOB") | 926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa |
IDNextStaus | string | | The IS of the status that you would like to change the job to | 926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa |
IDJobClosedReason | string | | If the job is set to closed lost or closed cancel status and it is mandatory to provide a reason then the reason ID must be provided. | 926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa |
BypassNotifications | bool | | If you would like to change the status without triggering notifications link to the status change (i.e. Emails or SMS) | false |
Sample of body
Code Block |
---|
{
"IDEntity": "d2617c62-b1e9-4d76-9ee0-7fef5a90f3d0",
"Entity": "JOB",
"IDNextStaus": "a610305a-1a34-4c3d-b271-d710ba6b3be3",
"BypassNotifications":false
} |
Sample call
Code Block |
---|
curl -X POST -d change_job_status.data \
-H "Content-Type: application/json" \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/workflow/updatestatus
|
Delete a job
Code Block |
---|
curl -X DELETE \
-H "Content-Type: application/json" \
-H "API-AppID: 7090fad1-c4da-4488-9ceb-55ee9847edcc" \
-H "Api-Username: jsmith" \
-H "API-Password: abc123" \
http://YourCompanyID.crittah.com/ws/apiv2/json/delete/fde3e1d7-5a7c-493d-b49f-dd514fa3b3af
|
...