Delete an Asynchronous Job
delete
/py-scripts/v2/jobs/{jobId}
Delete an asynchronous job specified by *jobId* from the Database.
Request
Path Parameters
-
jobId(required): string
The id of the asynchronous job
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
Job is deleted.
401 Response
When the user doesn't have privileges to perform the action.
500 Response
Problem connecting to Broker, finding the job id or other unexpected error.
Examples
If your Python function is running too long and you need to stop or delete it, you can use cURL to send a DELETE request to remove the running job. Use the following command:
curl -i -X DELETE --header "Authorization: Bearer ${token}" \
--header 'Accept: application/json' \
"<oml-cloud-service-location-url>/oml/api/py-scripts/v2/jobs/<jobId>"
Replace the placeholder values (${token},
<oml-cloud-service-location-url>, and
<jobId>) with your actual information.
Response
A successful response will look like this:
{
"result": "job deleted successfully"
}