Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

MethodResult
URIhttps://[CompanyID].crittah.com/ws/apiv2/[json or xml]/workflow/updatestatus
DELETENot used
GETNot used
POSTChange status of  an entity (e.g. Job)
PUTNot used

Data fields

FieldValue typeMandatoryDescriptionExample
IDEntitystring
Status
colourRed
titleYes
ID of the entity that you are changing the status for (e.g. IDJob)7090fad1-c4da-4488-9ceb-55ee9847edcc
Entitystring
Status
colourRed
titleYes
Entity type that the status is being updated for (Accepted Entity types: "JOB")926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa
IDNextStausstring
Status
colourRed
titleYes
The IS of the status that you would like to change the job to926a4185-6cb3-4a2a-a8ec-1fadc1cf4caa
IDJobClosedReasonstringIf 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
BypassNotificationsbool
Status
colourRed
titleYes
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

...