...
For a job that hasn't been triggered:
Code Block |
---|
{} |
Anchor | ||||
---|---|---|---|---|
|
Available as of Datameer 7.2
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:
Code Block |
---|
{
"status": "success",
"job-status": "_NONE"
} |
For a running job:
Code Block |
---|
{
"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:
Code Block |
---|
{
"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:
Code Block |
---|
{
"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:
Code Block |
---|
{
"status": "success",
"file-id": 48,
"job-execution-id": 4,
"job-status": "QUEUED",
"start-time": null
} |
For a canceled job:
Code Block |
---|
{
"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:
Code Block |
---|
{
"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:
Code Block |
---|
{
"status": "failure",
"reason": "File doesn't exist or isn't accessible with current permissions"
} |
Anchor | ||||
---|---|---|---|---|
|
Request method - GET
Description
Returns a specified number of job status results for a job.
URI syntax
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/rest/job-configuration/job-history/<job-configuration-id>?start=0&length=10'
Example response
Code Block |
---|
[ { "id": 30, "jobStatus": "COMPLETED" }, { "id": 27, "jobStatus": "COMPLETED" }, { "id": 23, "jobStatus": "COMPLETED" } ] |
Anchor | ||||
---|---|---|---|---|
|
Request method - GET
Description
Returns data about a job including the job counters, failure count, status, start/stop time, and successful record count.
URI syntax
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/rest/job-execution/job-details/<job-execution-id>'
Example response
Code Block |
---|
{ "counters": { "IMPORT_RECORDS": 494400, "IMPORT_BYTES": 23911522, "IMPORT_DROPPED_RECORDS": 0, "IMPORT_PREVIEW_RECORDS": 5000, "IMPORT_OUTPUT_BYTES": 24444883, "IMPORT_DROPPED_SPLITS": 0, "IMPORT_OUTPUT_PARTITIONS": 0 }, "failureCount": 0, "jobStatus": "COMPLETED", "startTime": "2012-07-06 18:19:09.0", "stopTime": "2012-07-06 18:21:07.0", "successCount": 494400 } |
Anchor | ||||
---|---|---|---|---|
|
Request method - GET
Description
Returns a list of all the active jobs in Datameer. This list displays the configuration ID, estimated time until completion, execution ID, current status, percent finished, and start time.
URI syntax
curl -u <username>:<password> -X GET 'http://<Datameer-serverIP>:<port-number>/rest/jobs/list-running'
Example response
Code Block |
---|
[ { "dapJobConfigurationId": 17, "estimateTime": "11 sec", "jobExecutionId": 37, "jobStatus": "RUNNING", "progress": 0, "startTime": "2011-05-19 22:35:39.0" }, { "dapJobConfigurationId": 20, "jobExecutionId": 38, "jobStatus": "RUNNING", "progress": 0, "startTime": "2011-05-19 22:35:39.0" }, { "dapJobConfigurationId": 19, "jobExecutionId": 39, "jobStatus": "RUNNING", "progress": 0, "startTime": "2011-05-19 22:35:39.0" }, { "dapJobConfigurationId": 18, "jobStatus": "RUNNING", "progress": 0, "startTime": "2011-05-19 22:35:39.0" } ] |
Trigger Job
Available as of Datameer 7.2
Request method - POST
Description
Triggers a job to run.
URI syntax
curl -u <username>:<password> -X POST 'http://<Datameer-serverIP>:<port-number>/api/job-execution/<file-id>|<uuid>|<path>/trigger'
Example response
Code Block |
---|
{
"status": "success",
"job-execution-id": 11,
"job-execution-user": "admin",
"job-execution-trigger": "RESTAPI"
} |
Stop Job
Available as of Datameer 7.2
Request method - POST
Description
Stops a job that is running.
URI syntax
curl -u <username>:<password> -X POST 'http://<Datameer-serverIP>:<port-number>/api/job-execution/<file-id>|<uuid>|<path>/stop'
Example response
This command doesn't return a response.
Anchor | ||||
---|---|---|---|---|
|
Request method - DELETE
Description
Removes a job from Datameer.
URI syntax
curl -u <username>:<password> -X DELETE 'http://<Datameer-serverIP>:<port-number>/rest/data/<data-id>'
Example response
No job or data available:
...