Перейти к основному содержимому

TaskService

Task 1.7.4

 
Versionv1.7
Release2022.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

PropertyTypeAttributesNotes
Actions (v1.1+) {}objectThe available actions for this resource.
EndTimestring
(date-time)
read-onlyThe 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+)booleanread-onlyAn 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+) {objectContains references to other resources that are related to this resource.
      CreatedResources (v1.7+) [ {arrayAn array of URIs referencing the resources created as the result of the operation that produced this task.
            @odata.idstring
(URI)
read-onlyThe unique identifier for a resource.
      } ]
      Oem {}objectThe 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 {}objectThe OEM extension property. See the Resource schema for details on this property.
Payload (v1.3+) {objectThe HTTP and JSON request payload details for this task, unless they are hidden from view by the service.
      HttpHeaders (v1.3+) [ ]array (string)read-onlyAn array of HTTP headers that this task includes.
      HttpOperation (v1.3+)stringread-onlyThe HTTP operation to perform to execute this task.
      JsonBody (v1.3+)stringread-onlyThe JSON payload to use in the execution of this task.
      TargetUri (v1.3+)string
(URI)
read-onlyThe URI of the target for this task.
}
PercentComplete (v1.4+)integer
(%)
read-only
(null)
The completion percentage of this task.
StartTimestring
(date-time)
read-onlyThe date and time when the task was started.
SubTasks (v1.5+) {objectThe link to a collection of sub-tasks for this task.
      @odata.idstring
(URI)
read-onlyThe unique identifier for a resource.
}
TaskMonitor (v1.2+)string
(URI)
read-onlyThe URI of the task monitor for this task.
TaskStatestring
(enum)
read-onlyThe state of the task. For the possible property values, see TaskState in Property details.
TaskStatusstring
(enum)
read-onlyThe completion status of the task. For the possible property values, see TaskStatus in Property details.

Property details

TaskState

 

The state of the task.

stringDescription
Cancelled (v1.2+)Task has been cancelled by an operator or internal process.
Cancelling (v1.2+)Task is in the process of being cancelled.
CompletedTask was completed.
ExceptionTask has stopped due to an exception condition.
InterruptedTask 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.
NewA new task.
PendingTask is pending and has not started.
RunningTask is running normally.
ServiceTask is running as a service.
StartingTask is starting.
StoppingTask is in the process of stopping.
SuspendedTask has been suspended.

TaskStatus

 

The completion status of the task.

stringDescription
CriticalA critical condition requires immediate attention.
OKNormal.
WarningA 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

 
Versionv1.2
Release2021.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

PropertyTypeAttributesNotes
Actions (v1.1+) {}objectThe available actions for this resource.
CompletedTaskOverWritePolicystring
(enum)
read-onlyThe 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.
DateTimestring
(date-time)
read-only
(null)
The current date and time, with UTC offset, setting that the task service uses.
LifeCycleEventOnTaskStateChangebooleanread-onlyAn indication of whether a task state change sends an event.
Oem {}objectThe OEM extension property. See the Resource schema for details on this property.
ServiceEnabledbooleanread-write
(null)
An indication of whether this service is enabled.
Status {}objectThe status and health of the resource and its subordinate or dependent resources. See the Resource schema for details on this property.
TaskAutoDeleteTimeoutMinutes (v1.2+)integerread-writeThe number of minutes after which a completed task is deleted by the service.
Tasks {objectThe links to the collection of tasks.
      @odata.idstring
(URI)
read-onlyThe 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.

stringDescription
ManualCompleted tasks are not automatically overwritten.
OldestOldest 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"
}