PATCH – Update Power Schedule Job properties
Use the PATCH method to update properties in Job resource for Redfish service
Request URL
GET https://<BMC_IPADDR>/redfish/v1/JobService/Jobs/{PowerOff, PowerOn, Restart}
Request body
Properties to be updated are shown as bellow, all of these properties can be changed individually.
Field | Type | Description | ||
---|---|---|---|---|
Schedule | Object | The schedule settings for this job. | ||
EnabledDaysOfWeek | Array | Expand. | ||
EnabledDaysOfWeek[N] | String | Days of the week when scheduled occurrences are enabled, for enabled days of the month and months of the year. If not present, all days of the week are enabled. | ||
InitialStartTime | Date-time | The date and time when the initial occurrence is scheduled to occur. |
Response body
The response returns same content as GET operation with updated properties.
Status code
HTTP Status Code | Error Message ID |
---|---|
500 | InternalError |
Example
The following example is PATCH body
{
"Schedule": {
"InitialStartTime": null,
"EnabledDaysOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
]
}
}
The following example JSON response is returned:
{
"MaxExecutionTime": null,
"JobStatus": "OK",
"Id": "Restart",
"@odata.id": "/redfish/v1/JobService/Jobs/Restart",
"HidePayload": true,
"Messages": [],
"PercentComplete": null,
"StepOrder": [],
"@odata.type": "#Job.v1_0_3.Job",
"JobState": "Suspended",
"Name": "Restart",
"@odata.etag": "\"41754a37fca8f52fe536e42dbcf4c544\"",
"Schedule": {
"RecurrenceInterval": null,
"InitialStartTime": null,
"EnabledDaysOfWeek@Redfish.AllowableValues": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
"Every"
],
"Name": "Lenovo:Restart",
"EnabledDaysOfWeek": []
},
"Description": "The resource is used to represent the settings of scheduled Restart actions for a Redfish implementation."
}
Give documentation feedback