TaskService
Task 1.7.4
| Version | v1.7 |
| Release | 2022.3 |
Description
The Task schema contains information about a task that the Redfish task service schedules or executes. Tasks represent operations that take more time than a client typically wants to wait.
URIs
/redfish/v1/TaskService/Tasks/{TaskId}
/redfish/v1/TaskService/Tasks/{TaskId}/SubTasks/{TaskId2}
Properties
| Property | Type | Attributes | Notes |
|---|---|---|---|
| Actions (v1.1+) {} | object | The available actions for this resource. | |
| EndTime | string (date-time) | read-only | The date and time when the task was completed. This property will only appear when the task is complete. |
| EstimatedDuration (v1.6+) | string (duration) | read-only (null) | The estimated total time required to complete the task. |
| HidePayload (v1.3+) | boolean | read-only | An indication of whether the contents of the payload are hidden from view after the task has been created. If true, responses do not return the payload. If false, responses return the payload. If this property is not present when the task is created, the default is false. |
| Links (v1.7+) { | object | Contains references to other resources that are related to this resource. | |
| CreatedResources (v1.7+) [ { | array | An array of URIs referencing the resources created as the result of the operation that produced this task. | |
| @odata.id | string (URI) | read-only | The unique identifier for a resource. |
| } ] | |||
| Oem {} | object | The OEM extension property. See the Resource schema for details on this property. | |
| } | |||
| Messages [ { } ] | array (object) | An array of messages associated with the task. See the v1_3_0.v1_3_0 schema for details on this property. | |
| Oem {} | object | The OEM extension property. See the Resource schema for details on this property. | |
| Payload (v1.3+) { | object | The HTTP and JSON request payload details for this task, unless they are hidden from view by the service. | |
| HttpHeaders (v1.3+) [ ] | array (string) | read-only | An array of HTTP headers that this task includes. |
| HttpOperation (v1.3+) | string | read-only | The HTTP operation to perform to execute this task. |
| JsonBody (v1.3+) | string | read-only | The JSON payload to use in the execution of this task. |
| TargetUri (v1.3+) | string (URI) | read-only | The URI of the target for this task. |
| } | |||
| PercentComplete (v1.4+) | integer (%) | read-only (null) | The completion percentage of this task. |
| StartTime | string (date-time) | read-only | The date and time when the task was started. |
| SubTasks (v1.5+) { | object | The link to a collection of sub-tasks for this task. | |
| @odata.id | string (URI) | read-only | The unique identifier for a resource. |
| } | |||
| TaskMonitor (v1.2+) | string (URI) | read-only | The URI of the task monitor for this task. |
| TaskState | string (enum) | read-only | The state of the task. For the possible property values, see TaskState in Property details. |
| TaskStatus | string (enum) | read-only | The completion status of the task. For the possible property values, see TaskStatus in Property details. |
Property details
TaskState
The state of the task.
| string | Description |
|---|---|
| Cancelled (v1.2+) | Task has been cancelled by an operator or internal process. |
| Cancelling (v1.2+) | Task is in the process of being cancelled. |
| Completed | Task was completed. |
| Exception | Task has stopped due to an exception condition. |
| Interrupted | Task has been interrupted. |
| Killed (deprecated v1.2) | Task was terminated. Deprecated in v1.2 and later. This value has been deprecated and is being replaced by the Cancelled value, which has more determinate semantics. |
| New | A new task. |
| Pending | Task is pending and has not started. |
| Running | Task is running normally. |
| Service | Task is running as a service. |
| Starting | Task is starting. |
| Stopping | Task is in the process of stopping. |
| Suspended | Task has been suspended. |
TaskStatus
The completion status of the task.
| string | Description |
|---|---|
| Critical | A critical condition requires immediate attention. |
| OK | Normal. |
| Warning | A condition requires attention. |
Example response
{
"@odata.type": "#Task.v1_7_4.Task",
"Id": "545",
"Name": "Task 545",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/545",
"TaskState": "Completed",
"StartTime": "2012-03-07T14:44+06:00",
"EndTime": "2012-03-07T14:45+06:00",
"TaskStatus": "OK",
"Messages": [
{
"MessageId": "Base.1.0.PropertyNotWritable",
"RelatedProperties": [
"SKU"
],
"Message": "The property SKU is a read only property and cannot be assigned a value",
"MessageArgs": [
"SKU"
],
"Severity": "Warning"
}
],
"@odata.id": "/redfish/v1/TaskService/Tasks/545"
}
TaskService 1.2.1
| Version | v1.2 |
| Release | 2021.1 |
Description
The TaskService schema describes a task service that enables management of long-duration operations, includes the properties for the task service itself, and has links to the resource collection of tasks.
URIs
/redfish/v1/TaskService
Properties
| Property | Type | Attributes | Notes |
|---|---|---|---|
| Actions (v1.1+) {} | object | The available actions for this resource. | |
| CompletedTaskOverWritePolicy | string (enum) | read-only | The overwrite policy for completed tasks. This property indicates if the task service overwrites completed task information. For the possible property values, see CompletedTaskOverWritePolicy in Property details. |
| DateTime | string (date-time) | read-only (null) | The current date and time, with UTC offset, setting that the task service uses. |
| LifeCycleEventOnTaskStateChange | boolean | read-only | An indication of whether a task state change sends an event. |
| Oem {} | object | The OEM extension property. See the Resource schema for details on this property. | |
| ServiceEnabled | boolean | read-write (null) | An indication of whether this service is enabled. |
| Status {} | object | The status and health of the resource and its subordinate or dependent resources. See the Resource schema for details on this property. | |
| TaskAutoDeleteTimeoutMinutes (v1.2+) | integer | read-write | The number of minutes after which a completed task is deleted by the service. |
| Tasks { | object | The links to the collection of tasks. | |
| @odata.id | string (URI) | read-only | The unique identifier for a resource. |
| } |
Property details
CompletedTaskOverWritePolicy
The overwrite policy for completed tasks. This property indicates if the task service overwrites completed task information.
| string | Description |
|---|---|
| Manual | Completed tasks are not automatically overwritten. |
| Oldest | Oldest completed tasks are overwritten. |
Example response
{
"@odata.type": "#TaskService.v1_3_0.TaskService",
"Id": "TaskService",
"Name": "Tasks Service",
"DateTime": "2015-03-13T04:14:33+06:00",
"CompletedTaskOverWritePolicy": "Manual",
"LifeCycleEventOnTaskStateChange": true,
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ServiceEnabled": true,
"Tasks": {
"@odata.id": "/redfish/v1/TaskService/Tasks"
},
"@odata.id": "/redfish/v1/TaskService"
}