Retrieve All Asynchronous Jobs or Based on Matching Filters
/py-scripts/v2/jobs
Request
-
commentsPattern: string
Optional regex pattern filter for the job comments column.
-
createdOlderThanSeconds: integer(int64)
Optional age filter. Return jobs created more than this many seconds ago. Must be non-negative.
-
createdWithinSeconds: integer(int64)
Optional duration, in seconds, used to return only jobs created within this window. Allowed range is 1 to 604800 seconds.
-
finishedOlderThanSeconds: integer(int64)
Optional age filter. Return jobs finished more than this many seconds ago. Must be non-negative.
-
status: string
Optional job status filter, for example FINISH, ERROR, CANCELLED, TIMEOUT, or RUNNING.
There's no request body for this operation.
Back to TopResponse
- application/json
200 Response
400 Response
401 Response
500 Response
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"
}
]
}