Difference between revisions of "Setting the status of a job"
From MyMobileWorkers API
| Line 55: | Line 55: | ||
== Example success response == | == Example success response == | ||
| + | <source lang="java"></source> | ||
== Example failure response == | == Example failure response == | ||
| + | <source lang="java"></source> | ||
== Example curl request == | == Example curl request == | ||
Revision as of 09:57, 9 August 2016
The status of a job can be changed remotely by placing requests against the API.
Contents |
Summary
| Update job status | ||
|---|---|---|
| URL | https://:base_url/:api_path/:version/jobs//job/status/update?api_key=YOUR_KEY&&job_number=JOB_NUMBER&status=JOB_STATUS | |
| Type | POST | |
| Params: | api_key | required |
| job_number | required | |
| status | required | |
| Response | JSON | |
Valid status transitions
| Current status | Possible status | |
|---|---|---|
| NEW | JOB_COMPLETED | |
| NEW | JOB_FAILED | |
| NEW | CUSTOM_COMPLETED_TYPE | |
| JOB_COMPLETED | JOB_FAILED | |
| JOB_FAILED | JOB_COMPLETED | |
| CUSTOM_COMPLETED_TYPE | CUSTOM_COMPLETED_TYPE | |
Example success response
Example failure response
Example curl request
curl -X POST "https://live.mymobileworkers.com:8181/api/1/jobs/job/status/update?api_key=APIKEY&job_number=JOB_NUMBER&status=JOB_COMPLETED"
curl -X POST "https://live.mymobileworkers.com:8181/api/1/jobs/job/status/update?api_key=APIKEY&job_number=JOB_NUMBER&status=JOB_FAILED"