Purpose
The restart RESTful API restarts a job using the following URL and method:
Item | Description | ||
---|---|---|---|
URL | /datamover/executingJobs | ||
Method | POST |
Request Parameters
- action
- Description: Value "restart" to distinguish from other POST commands on /executingJobs (not case-sensitive)
- jobExecutionName
- Description: Job execution name for restart
- uowid
- Description: Unit of work ID
- sync
- Description: Specifies if the command is sync
Response Parameters
- jobExecutionName
- Description: Job execution name if job executed, or blank if not executed
- status
- Description: Status of job
Status Codes
If the command executes without error, the API returns status code 200 in the response header and nothing in the response body.
If an error occurs during execution, the API returns a non-200 status code in the response header and an error message in JSON format in the response body.
Response Examples
In this example, sync is false.
{ "jobExecutionName" : "executedJob-20141204175020" , "status":"started" "links" : [{ "rel" : "status" "href" : "http://server/datamover/jobs/executedJob-20141204175020" }, { "rel" : "stop" "href" : "http://server/datamover/jobs/executedJob-20141204175020" } ] }
In this example, sync is true.
{ "jobExecutionName" : "executedJob-20141204175020" , "status" : "FAILED" , "links" : [{ "rel" : "status" "href" : "http://server/datamover/jobs/executedJob-20141204175020" } ] }
In this example, the job restart failed.
{ "error" : "The job failed to execute because another job has already started" }
restart RESTful API Example
{ "action":"restart", "jobExecutionName":"job_restart-date-time", "sync":"true" }