GET /tasks/schedules<ID>

Use this GET method to retrieve information about a specific scheduled job.

Note: This API requires Lenovo XClarity Administrator v2.0.0 or later

Authentication

Authentication with user name and password is required.

Request URL

GET https://<management_server_IP>/tasks/schedules<ID>

where <ID> is the ID of the scheduled job. To obtain the scheduled job IDs, use GET /tasks/schedules.

Query parameters

None

Request body

None

Response codes

Code Description
200 OK
400 Bad request
401 Unauthorized
403 Forbidden
404 Not found
409 Conflict
500 Internal server error

Response body

Attributes Type Description
componentIDs Array of strings List of UUIDs of the devices or resource groups that are the target for the action.

To obtain the device and resource group IDs, use GET /chassis, GET /nodes, GET /storage, GET /switches, and GET /resourceGroups.

createdBy String User name that created the scheduled job
creationDate String Timestamp when the scheduled job was created
description String Description of the scheduled job
execDate String Timestamp when the scheduled job is to run next.
id String ID of the scheduled job
jobIDs Array of strings List of IDs for all jobs that were started from the schedule
lastExecDate String Timestamp when the scheduled job was last run
matchEverything Boolean Indicates whether the action is to be run against all managed devices. This can be one of the following values.
  • true. The action is to be run against all managed devices

  • false. The action is run against only the managed device that is specified by the target attribute.

name String Name of the scheduled job
nextExecDate String Timestamp for the next scheduled run time of the job
state String State of the scheduled job. This can be one of the following values:
  • ACTIVE

  • ENDED

  • PAUSED

targets String Device or resource group name that is the target for the job. If not application, the value is NONE. If more there is more than one target, the value is Multiple Targets.
triggerAction Object Information about the action that you want to schedule.
  actionBundleKey String The bundle in which the user action is declared
  actionBundleTitle String The bundle in which the translated user action is located
  actionID String ID of the action to be performed.

To obtain the action IDs, use GET /tasks/schedules/actions.

  actionType String Type of action to be performed. This can be one of the following value:
  • CUSTOM_REST

  • REST

  restBody String REST request body for the action to be run.
  restHeaders Array of objects REST request header for the action to be run.
    headerKey String  
    headerValue String  
  restMethod String REST method of the action to be run. This can be one of the following values:
  • GET

  • PUT

  • POST

  • DELETE

  restURL String REST URL of the job to be run.
type String Type of schedule. This can be one of the following values.
  • ONE_TIME. The job runs one time on all target devices. If the specified start and end date are in the past, the job runs imminently.

  • RECURRING. The job runs on the specified dates and times on all target devices.

  • EVENT_TRIGGERED. The job runs when a specified event occurs. This job runs only on the device that generated the event.

Response example

{
   "componentIDs": [
      "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
      "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
      "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"],
   "createdBy": "ADMIN",
   "creationDate": "2017-10-26T15:14:44Z",
   "description": "",
   "execDate": "2017-10-26T04:00:00Z",
   "id": "1509030884611",
   "jobIDs": [],
   "lastExecDate": "2017-10-26T15:15:13Z",
   "matchEverything": false,
   "name": "Power off",
   "nextExecDate": "Not Available",
   "state": "ENDED"
   "targets": " Multiple Targets",
   "triggerAction": {
      "bundleTitle": "com.lenovo.lxca.discovery.bundle.jobs.jobActions",
      "bundleKey": "PowerOff1",
      "id": "PowerOff001",
      "restBody": "{}",
      "restHeaders": [],
      "restMethod": "PUT",
      "restURL": "/manage/power",
      "type": "REST"
   },
   "type": "ONE_TIME"
}