Delete an Asynchronous Job

delete

/py-scripts/v2/jobs/{jobId}

Delete an asynchronous job specified by *jobId* from the Database.

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Job is deleted.
Body ()
Root Schema : JSONObject
Type: object
Show Source

401 Response

When the user doesn't have privileges to perform the action.
Body ()
Root Schema : UnauthorizedException
Type: object
Show Source

500 Response

Problem connecting to Broker, finding the job id or other unexpected error.
Body ()
Root Schema : ComputeContainerException
Type: object
Show Source
Back to Top

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"
}
Back to Top