Search for jobs
get
/iam/governance/selfservice/api/v1/scheduler/jobs
Retrieves the details of a job that matches the provided search criteria.
Request
Query Parameters
-
limit: integer
The numbers of items to return
-
offset: string
The number of items to skip before starting to collect the result set
-
orderBy: string
The sort field and the sort order in the format `field:order`. Available values of `field` are *jobName*, *taskName* and *status*. Available values of `order` are *desc* and *asc*.
-
q: string
Search query in the format `field eq search_text`. `field` can be *Job::Name*, *Task::Name*, *Status*. `search_text` supports wildcard character * and the space character should be replaced by double colon(::)
Response
Supported Media Types
- application/json
200 Response
OK
Nested Schema : items
Type:
Show Source
object-
enabled(optional):
boolean
-
haveHistory(optional):
boolean
-
name(optional):
string
-
nextScheduleTime(optional):
string(date-time)
Format: yyyy-MM-dd'T'HH:mm:ss'Z'
-
status(optional):
string
Allowed Values:
[ "STOPPED", "RUNNING", "INTERRUPTED", "FAILED" ] -
taskName(optional):
string
400 Response
Invalid input
Examples
The following example shows how to retrieve the details of a job that matches the provided search criteria by submitting the GET request using cURL. The information shown here is against a pseudo system and serves as a prototype.
cURL Example
curl -i -X GET -u username:password / --header 'Accept: application/json' / --header 'Content-Type: application/json' / 'http://pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs?orderBy=jobName:desc&q=Job::Status eq 5 and Job::Status eq 2 and Job::Name eq A*'
Example of Response Body
The following example shows the JSON response for a retrieval request for the details of a job that matches the provided search criteria:
{
"links": [
{
"rel": "self",
"href": "pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs"
},
{
"rel": "self",
"href": "http://pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs?orderBy=jobName%3Adesc&offset=1&limit=10&q=Job%3A%3AStatus%20eq%205%20and%20Job%3A%3AStatus%20eq%202%20and%20Job%3A%3AName%20eq%20A%2A"
},
{
"rel": "first",
"href": "http://pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs?orderBy=jobName%3Adesc&offset=1&limit=10&q=Job%3A%3AStatus%20eq%205%20and%20Job%3A%3AStatus%20eq%202%20and%20Job%3A%3AName%20eq%20A%2A"
}
],
"count": 5,
"hasMore": false,
"totalResult": 6,
"jobs": [
{
"name": "Automated Retry of Failed Async Task",
"taskName": "Retry Failed Async Task",
"status": "STOPPED",
"enabled": true,
"haveHistory": true,
"nextScheduleTime": "2022-08-23T16:58:51Z"
},
{
"name": "Attestation Grace Period Expiry Checker",
"taskName": "Attestation Grace Period Expiry Checker",
"status": "STOPPED",
"enabled": false,
"haveHistory": false,
"nextScheduleTime": "2022-08-23T16:58:51Z"
},
{
"name": "Application Template Generation Job",
"taskName": "Application Template Generation Task",
"status": "STOPPED",
"enabled": true,
"haveHistory": false
},
{
"name": "Application Instance Post Delete Processing Job",
"taskName": "Application Instance Post Delete Processing Task",
"status": "STOPPED",
"enabled": true,
"haveHistory": false
},
{
"name": "Application Bulk Create Job",
"taskName": "Application Bulk Create",
"status": "STOPPED",
"enabled": true,
"haveHistory": false
}
],
"offset": 1,
"limit": 10
}{
"links": [
{
"rel": "self",
"href": "http://pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs"
},
{
"rel": "self",
"href": "http://pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs?orderBy=jobName%3Adesc&offset=1&limit=10&q=Job%3A%3AStatus%20eq%205%20and%20Job%3A%3AStatus%20eq%202%20and%20Job%3A%3AName%20eq%20A%2A"
},
{
"rel": "first",
"href": "http://pseudo.com/iam/governance/selfservice/api/v1/scheduler/jobs?orderBy=jobName%3Adesc&offset=1&limit=10&q=Job%3A%3AStatus%20eq%205%20and%20Job%3A%3AStatus%20eq%202%20and%20Job%3A%3AName%20eq%20A%2A"
}
],
"count": 5,
"hasMore": false,
"totalResult": 6,
"jobs": [
{
"name": "Automated Retry of Failed Async Task",
"taskName": "Retry Failed Async Task",
"status": "STOPPED",
"enabled": true,
"haveHistory": true,
"nextScheduleTime": "2022-07-28T05:36:51Z"
},
{
"name": "Attestation Grace Period Expiry Checker",
"taskName": "Attestation Grace Period Expiry Checker",
"status": "STOPPED",
"enabled": false,
"haveHistory": false,
"nextScheduleTime": "2022-07-28T05:36:51Z"
},
{
"name": "Application Template Generation Job",
"taskName": "Application Template Generation Task",
"status": "STOPPED",
"enabled": true,
"haveHistory": false
},
{
"name": "Application Instance Post Delete Processing Job",
"taskName": "Application Instance Post Delete Processing Task",
"status": "STOPPED",
"enabled": true,
"haveHistory": false
},
{
"name": "Application Bulk Create Job",
"taskName": "Application Bulk Create",
"status": "STOPPED",
"enabled": true,
"haveHistory": true,
"nextScheduleTime": "2022-07-28T06:02:00Z"
}
],
"offset": 1,
"limit": 10
}