REST API Job Commands
- 1 Job Status
- 1.1 Description
- 1.2 URI syntax
- 1.3 Example response
- 2 Job Status V2
- 2.1 Description
- 2.2 URI syntax
- 2.3 Example response
- 3 Job History
- 3.1 Description
- 3.2 URI syntax
- 3.3 Example response
- 4 Job Details
- 4.1 Description
- 4.2 URI syntax
- 4.3 Example response
- 4.4 7.4 Example response
- 5 List Active Jobs
- 5.1 Description
- 5.2 URI syntax
- 5.3 Example response
- 6 Trigger Job
- 6.1 Description
- 6.2 URI syntax
- 6.3 Example response
- 7 Sequential Trigger Job
- 7.1 Description
- 7.2 URI syntax
- 7.3 Example response
- 8 Stop Job
- 8.1 Description
- 8.2 URI syntax
- 8.3 Example response
- 9 Delete Job
- 9.1 Description
- 9.2 URI syntax
- 9.3 Example response
For each call, you can add the following command:
-w"\n%{http_code}\n"
After the username and password in order to receive more meaningful HTTP errors.
Job Status
Request method - GET
Description
Returns the id and current status of a specified job.
URI syntax
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/rest/job-configuration/job-status/<job-configuration-id>'
Example response
For a running job:
{
"id": 49,
"jobStatus": "RUNNING"
}
For a completed job:
{
"id": 30,
"jobStatus": "COMPLETED"
}
For a job completed with warnings:
{
"id": 32,
"jobStatus": "COMPLETED_WITH_Warnings"
}
For a job completed with errors:
{
"id": 36,
"jobStatus": "ERROR"
}
For a cancelled job:
{
"id": 39,
"jobStatus": "CANCELED"
}
For a job that hasn't been triggered:
{}Job Status V2
Available as of Datameer 7.2.5
Request method - GET
Description
Returns the id and current status of a specified job.
URI syntax
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/api/job-execution/<file-id>|<uuid>|<path>/status'
Example response
For a job that has never been run:
{
"status": "success",
"job-status": "_NONE"
}
For a running job:
{
"status": "success",
"file-id": 48,
"job-execution-id": 3,
"job-status": "RUNNING",
"start-time": "Sep 28, 2018 6:44:56 PM",
"estimate-time":"11s",
"job-progress":"0"
}
For a completed job:
{
"status": "success",
"file-id": 48,
"job-execution-id": 3,
"job-status": "COMPLETED",
"start-time": "Sep 28, 2018 6:44:56 PM",
"stop-time": "Sep 28, 2018 6:44:58 PM"
}
For a completed job with errors:
{
"status": "success",
"file-id": 46,
"job-execution-id": 4,
"job-status": "COMPLETED_WITH_WARNINGS",
"start-time": "Sep 28, 2018 10:09:47 AM",
"stop-time": "Sep 28, 2018 10:09:52 AM"
}
For a queued job:
{
"status": "success",
"file-id": 48,
"job-execution-id": 4,
"job-status": "QUEUED",
"start-time": null
}
For a canceled job:
{
"status": "success",
"file-id": 48,
"job-execution-id": 4,
"job-status": "CANCELED",
"start-time": null,
"stop-time": "Sep 28, 2018 6:58:41 PM"
}If the example job had been running and was then canceled, a "start-time" would also be displayed.
For a triggered job:
{
"status": "success",
"job-execution-id": 3,
"job-execution-user": "analyst",
"job-execution-trigger": "RESTAPI"
}
For a job that has been stopped:
There isn't a response if the job was successfully stopped.
Error: