Skip to main content

GET /api/v1/jobs-management/schedules

Use this method to return a list of all scheduled jobs.

Note
This REST API requires Lenovo XClarity Orchestrator v2.1 or later.

Authentication

Authentication with username and password is required.

Resource URI

GET https://{orchestrator_server_IP}/api/v1/jobs-management/schedules

Query parameters

This REST API supports query parameters for paginating, filtering, sorting, including data, and excluding data in the response. For more information about these common query parameters, see Paginating, scoping, filtering, sorting, including data, and excluding data in responses. For a list of supported attributes, see GET /api/v1/jobs-management/schedules/{id}.

The following example returns all scheduled firmware-update jobs.
GET https://192.0.2.0/jobs-management/schedules
?filterEquals[0][attributes]=metadata.method&filterEquals[0][values]=POST
&filterContains[1][attributes]=method.path&filterContains[1][values]=updates

Request body

None

Response codes

CodeDescriptionComments
200OKThe request completed successfully. The request completed successfully. If a query parameter is specified and the value of that parameter has no matches, the response body returns default values. The request completed successfully. If a single query parameter is specified and the value of that parameter has no matches, the response body returns default values. If a list of query parameters is specified and the value of at least one parameter has no matches, the response body returns only what matches.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

When the request is successful, the following attributes are returned. If the request fails, standard message attributes are returned (see Status messages).

AttributesTypeDescription
resultsArray of objectsInformation about each scheduled job
 idStringScheduled job ID
 createdByStringName of the user that created the schedule
 creationTimestampStringTimestamp when the scheduled job was created.

This timestamp is specified using ISO-8601 format (for example, 2019-05-02T19:28:14.000Z). For information about ISO-8601 format, see the W3C Date and Time Formats webpage.

 jobIDStringJob ID
 launchedTimestampStringTimestamp when the scheduled job ran

This timestamp is specified using ISO-8601 format (for example, 2019-05-02T19:28:14.000Z). For information about ISO-8601 format, see the W3C Date and Time Formats webpage.

 metadataObjectInformation about the operation to be performed for this job
  bodyObjectRequest body of the operation
  methodStringMethod. This value is always POST.
  pathStringURI of the operation, including query parameters
 statusStringJob status (translated). For a job with subtasks, this is most severe status of all subtsaks. This can be one of the following values.
  • Cancelled. The schedule was canceled.
  • Error. An error prevented the job from running on schedule..
  • Launched. The job ran on schedule.
  • Pending. The job is scheduled for a later time.
 statusKeyStringJob status key. For a job with subtasks, this is most severe status of all subtsaks. This can be one of the following values.
  • cancelled. The schedule was canceled.
  • error. An error prevented the job from running on schedule..
  • launched. The job ran on schedule.
  • pending. The job is scheduled for a later time.
 scheduleTimestampStringTimestamp when the scheduled job is to run

This timestamp is specified using ISO-8601 format (for example, 2019-05-02T19:28:14.000Z). For information about ISO-8601 format, see the W3C Date and Time Formats webpage.

 titleStringScheduled job title
 _linksObjectResource URI (see Links)
_metadataObjectRequest metadata (see Metadata)
{
"results": {
"id": "c3047feb4ad44ba2b956950c812ce36e",
"createdBy": "user1",
"creationTimestamp": "2024-01-29T17:41:03.429Z",
"jobID": "156",
"launchedTimestamp": "2024-01-29T17:41:08.355Z",
"metadata": {
"method": "POST",
"path": "/api/v1/updates-management/updates",
"body": {
"activationRule": "ImmediateActivation",
"forceUpdate": false,
"groupIDs": [],
"installPrerequisiteFirmware": false,
"resourceIDs": [ "CFEC7691C59F3613A1D47ABA0113C99C-5B421B48D19F46FBAD1A20F620D670D2" ],
"updateRule": "ContinueOnError"
}
},
"scheduleTimestamp": "2024-01-10T13:00:00.000Z",
"status": "Launched",
"statusKey": "launched",
"title": "test",
"_links": {
"rel": "self",
"uri": "/api/v1/jobs-management/schedules/c3047feb4ad44ba2b956950c812ce36e"
},
"_metadata": {}
}