webMethods OneData 10.11 | Managing Master Data with webMethods OneData | Developing for webMethods OneData | RESTful Web Services | Managing Jobs through RESTful Web Services | Stopping a Job with a REST Service URL
 
Stopping a Job with a REST Service URL
You can only stop a job that is in progress by using a POST request.
*To stop a job with a REST web service
*In the browser, enter the RESTful web service link.
Example:
http://localhost:1101/onedataVVT/rest/onedatamd/Standard%20Project/JOB/terminate/IM_Location_Job
The following is a sample of the REST response to your POST request.
Example: Successful job termination response
{
"jobOutput": {
"status": "200",
"jobLogId": "6171",
"statusMessage": "Job termination request has been submitted."
}
}
If the job has already been completed, the message that appears informs you that the job cannot be terminated.
Example: Termination request response for a completed job
{
"jobOutput": {
"status": "202",
"statusMessage": "Jobs in active or pending active status can only be
terminated. Current status of the job is: Completed Successfully. Hence
termination request can not be submitted."
}
}
If you perform a GET request with the job log ID of the job termination request, you can view the complete details.
Example: Details of termination request with job log ID
{
"jobOutput": {
"status": "200",
"jobLogId": "6171",
"details": {
"jobName": "Rest_Imp_Job",
"jobId": "20981",
"jobStatus": "Completed with Errors. The job step execution was interrupted
by a job termination request. All the changes made by the various job steps
were rolled back.",
"jobSteps": [
{
"jobStepName": "Imp_Test_upd_obj",
"jobStepId": "20982",
"message": "Total records inserted/updated : 8,700.<BR>Process
Interrupted. Job interrupted by user.<BR>There were errors during
the import process. As partial commit was not enabled, all successful
batches have been rolledback.<BR>Failed entries are not posted into
the queue as partial commit is not enabled.<BR>",
"successRecordCount": "0",
"failedRecordCount": "0",
"fileName": "Job_Log_3556.log"
}
]
}
}
}