POST /api/v1/jobs-management/schedules
Use this method to create a scheduled job.
Note
This REST API requires Lenovo XClarity Orchestrator v2.1 or later.
Authentication
Authentication with username and password is required.
Resource URI
POST https://{orchestrator_server_IP}/api/v1/jobs-management/schedules
Query parameters
None
Request body
| Attributes | Required / Optional | Type | Description | ||
|---|---|---|---|---|---|
| metadata | Required | Object | Information about the operation to be performed for this job | ||
| body | Required | Object | Request body of the operation | ||
| method | Required | String | Method. This value is always POST. | ||
| path | Required | String | URI of the operation, including query parameters | ||
| scheduleTimestamp | Required | String | Timestamp 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. | ||
| title | Required | String | Scheduled job title | ||
The following example creates a scheduled firmware-update job.
{
"metadata": {
"body": {
"activationRule": "ImmediateActivation",
"forceUpdate": false,
"groupIDs": [],
"installPrerequisiteFirmware": false,
"resourceIDs": ["CFEC7691C59F3613A1D47ABA0113C99C-5B421B48D19F46FBAD1A20F620D670D2"],
"updateRule": "ContinueOnError"
},
"method": "POST",
"path": "/api/v1/updates-management/updates"
},
"scheduleTimestamp": "2024-01-10T13:00:00.000Z",
"title": "test"
}
Response codes
| Code | Description | Comments |
|---|---|---|
| 201 | Created | One or more new resources were successfully created. |
| 400 | Bad Request | A 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. |
| 500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response header
The URL of the scheduled job is returned in the Location
field.
Response body
| Attributes | Type | Description | ||
|---|---|---|---|---|
| {message_attributes} | varies | Status messages (see Status messages) | ||
Give documentation feedback