Retrieve All Asynchronous Jobs or Based on Matching Filters

get

/py-scripts/v2/jobs

Retrieves the status, job id, elapsed time of the asynchronous jobs matching all supplied filters. If no filter is specified, it will return all the asynchronous jobs.

Request

Query Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

List of asynchronous jobs.
Body ()
Root Schema : JSONObject
Type: object
Show Source

400 Response

Invalid parameters specified.
Body ()
Root Schema : InvalidParameterValueException
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

Use the asynchronous jobs endpoint to retrieve jobs and filter the results by creation time, completion time, status, or comments. Each example below shows an independent request and a sample response.

Retrieve all asynchronous jobs

The following example retrieves all asynchronous jobs.

curl -i -X GET --header "Authorization: Bearer ${token}" \
--header 'Accept: application/json' \
"<oml-cloud-service-location-url>/oml/api/py-scripts/v2/jobs"

The response body in JSON format is the following:

{
    "result": [
        {
            "createdDate": "2026-01-06 21:40:08 UTC",
            "job_id": "<job_id>",
            "status": "FINISH",
            "elapsedTime": "00:00:22"
        }
    ]
}

Retrieve jobs based on filters

You can filter jobs using one or more of the following criteria:

  • Jobs created within the last 30 minutes
  • Jobs created more than 1,200 seconds ago
  • Jobs finished more than 1,200 seconds ago.
  • Jobs with a specified status.
  • Jobs whose comments match a pattern.

Each example includes the request and a sample response.

Jobs created within the last 30 minutes

To retrieve list of jobs created within the last 30 minutes, set createdWithinSeconds to 1800.

curl -i -k -X GET \
    --header "Authorization: Bearer ${token}" \
    --header 'Accept: application/json' \
    "<oml-cloud-service-location-url>/oml/api/py-scripts/v2/jobs?createdWithinSeconds=1800"

The response contains jobs created within the last 1,800 seconds.

{
    "result": [
        {
            "createdDate": "2026-08-10 22:08:50 UTC",
            "comments": "Model tuning job.",
            "job_id": "...",
            "status": "FINISH",
            "elapsedTime": "00:00:28"
        },
        {
            "createdDate": "2026-08-10 22:11:32 UTC",
            "comments": "Model tuning job. Before Model Tuning.",
            "job_id": "...",
            "status": "CANCELLED",
            "elapsedTime": "00:00:43"
        }
    ]
}

Jobs created more than 1,200 seconds ago.

To retrieve list of jobs created more than 1,200 seconds ago, set createdOlderThanSeconds to 1200.

curl -i -k -X GET \
    --header "Authorization: Bearer ${token}" \
    --header 'Accept: application/json' \
    "<oml-cloud-service-location-url>/oml/api/py-scripts/v2/jobs?createdOlderThanSeconds=1200"

The response contains jobs created more than 1,200 seconds ago.

{
    "result": [
        {
            "createdDate": "2026-08-11 20:00:44 UTC",
            "comments": "AutoML Algo select job on DIGITS. Train test split completed. AlgorithmSelection completed in 63.699961 seconds",
            "job_id": ""<job_id>"",
            "status": "FINISH",
            "elapsedTime": "00:01:25"
        },
        {
            "createdDate": "2026-08-11 20:02:59 UTC",
            "comments": "Model tuning job. Before Model Tuning. Model Tuning completed, best model: Neural Network",
            "job_id": ""<job_id>"",
            "status": "FINISH",
            "elapsedTime": "00:02:33"
        }
    ]
}

Jobs finished more than 1,200 seconds ago.

To retrieve list of jobs finished more than 1,200 seconds ago, set finishedOlderThanSeconds to 1200.

curl -i -k -X GET \
    --header "Authorization: Bearer ${token}" \
    --header 'Accept: application/json' \
    "<oml-cloud-service-location-url>/oml/api/py-scripts/v2/jobs?finishedOlderThanSeconds=1200"

The response contains jobs finished more than 1,200 seconds ago.

{
    "result": [
        {
            "createdDate": "2026-08-11 20:00:44 UTC",
            "comments": "AutoML Algo select job on DIGITS. Train test split completed. AlgorithmSelection completed in 63.699961 seconds",
            "job_id": ""<job_id>"",
            "status": "FINISH",
            "elapsedTime": "00:01:25"
        },
        {
            "createdDate": "2026-08-11 20:02:59 UTC",
            "comments": "Model tuning job. Before Model Tuning. Model Tuning completed, best model: Neural Network",
            "job_id": ""<job_id>"",
            "status": "FINISH",
            "elapsedTime": "00:02:33"
        }
    ]
}

List jobs with a specified status

To retrieve list of jobs with a specified status, set status to that status. The example below uses cancelled.

curl -i -k -X GET \
    --header "Authorization: Bearer ${token}" \
    --header 'Accept: application/json' \
    "<oml-cloud-service-location-url>/oml/api/py-scripts/v2/jobs?status=cancelled"

The response contains jobs with the CANCELLED status.

{
    "result": [
        {
            "createdDate": "2026-08-11 20:21:01 UTC",
            "comments": "Model tuning job. Before Model Tuning.",
            "job_id": ""<job_id>"",
            "status": "CANCELLED",
            "elapsedTime": "00:01:13"
        }
    ]
}

Filter jobs matching two criteria: comments and time since completion

To retrieve jobs whose comments match tuning and that finished more than 600 seconds ago, set commentsPattern to tuning and finishedOlderThanSeconds to 600.

curl -i -k -X GET \
  --header "Authorization: Bearer ${token}" \
  --header 'Accept: application/json' \
  "<oml-cloud-service-locationurl>/oml/api/py-scripts/v2/jobs?commentsPattern=tuning&finishedOlderThanSeconds=600"

The response contains jobs that match both filters: their comments match tuning, and they finished more than 600 seconds ago.

{
  "result": [
    {
      "createdDate": "2026-08-10 22:11:32 UTC",
      "comments": "Model tuning job. Before Model Tuning.",
      "job_id": "...",
      "status": "CANCELLED",
      "elapsedTime": "00:00:43"
    }
  ]
}
Back to Top