GET – Task Instance
Request
GET https://{{ip}}/redfish/v1/TaskService/Tasks/{{task_instance}}
Content-Type: application/json
Response
The Response Status Code will be 200 OK, irrespective of the Task State and the Response Body of the request will be in JSON format.
The properties of the Response Body are mentioned in the following table.
Name | Type | Read only | Description | |
(OData Attributes) | Refer to OData Support | |||
Oem | Object | OEM Extension (Optional), Refer to Resource Complex Types | ||
Id(M) | String | True | Refer to Resource Type Definitions | |
Name(M) | String | True | ||
Description | String | True | ||
TaskState | String | True | The value of this property shall indicate the state of the task. | |
Enum | Description | |||
New | New shall be used to indicate that the task is a new task which has just been instantiated and is in the initial state and indicates it has never been started. | |||
Starting | Task is starting. Starting shall be used to indicate that the task is moving from the New, Suspended, or Service states into the Running state. | |||
Running | Task is running normally. Running shall be used to indicate that the Task is running. | |||
Suspended | Task has been suspended. Suspended shall be used to indicate that the Task is stopped (e.g., by a user), but can be restarted in a seamless manner. | |||
Interrupted | Task has been interrupted. Interrupted shall be used to indicate that the Task was interrupted (e.g., by a server crash) in the middle of processing, and the user should either re-run/restart the Task. | |||
Pending | Task is pending and has not started. Pending shall be used to indicate that the Task has been queued and will be scheduled for processing as soon as resources are available to handle the request. | |||
Stopping | Task is in the process of stopping. Stopping shall be used to indicate that the Task is in the process of moving to a Completed, Killed, or Exception state. | |||
Completed | Task has completed. Completed shall be used to indicate that the task has completed normally. | |||
Killed | Task was terminated. Killed shall be used to indicate that the task has been stopped by a Kill state change request (non-graceful shutdown). | |||
Exception | Task has stopped due to an exception condition. Exception shall be used to indicate that the Task is in an abnormal state that might be indicative of an error condition. | |||
Service | Task is running as a service. Service shall be used to indicate that the Task is in a state that supports problem discovery, or resolution, or both. This state is used when a corrective action is possible. | |||
Cancelling | Task is in the process of being cancelled. | |||
Cancelled | Task has been cancelled by an operator or internal process. It will show reason for cancellation. For Error Responses, please refer to Error Response. | |||
StartTime | String | True | The date-time stamp that the task was last started. The value of this property shall indicate the time the task was started. | |
EndTime | String | True | The value of this property shall indicate the time the task was completed. | |
TaskStatus | String | True | The value of this property shall be the completion status of the task, as defined in the Status Section of the Redfish specification and shall not be set until the task has completed. | |
Messages | Array | True | This is an array of messages associated with the task. | |
Actions | Object | True | This object will contain the actions for this resource under Oem property if any. | |
HidePayload | Boolean | True | If value of this property is true will hide the contents of the Payload otherwise the Payload contents can be returned normally. North Bound Support only available. | |
PercentComplete | Interger | True | Completion percentage of this Task. North Bound Support only available. | |
Payload | Object | True | Refer to below table for Payload property details. |
Name | Type | Read only | Description |
HttpHeaders | Array | True | HTTP Headers used in the execution of this Task. |
HttpOperation | String | True | HTTP Operation to execution for this Task. |
JsonBody | String | True | JSON Payload used for this Task. |
TargetUri | String | True | URI of the Target for this Task. |
Behavior
This URI represents the details of the task created. Check the response for its attributes.
This URI will be available only if any tasks are added onto Tasks Collection.
As per the Redfish DMTF Schema, the supported Enum values for TaskState are as defined below:
"New", "Starting", "Running", "Suspended", "Interrupted", "Pending", "Stopping", "Completed", "Killed", "Exception", "Service", "Cancelling", "Cancelled".
As per the current implementation in our Redfish Stack, we make use of the below-mentioned Enum values of TaskState :
“New", "Running", "Pending", "Completed", "Exception", "Cancelled".
However, we do provide support for all the Enum values as mentioned in the schema.
The Enum values "Starting", "Suspended", "Interrupted", "Stopping", "Service", "Killed" and "Cancelling" can be used by any new feature according to their needs and will be utilized as and when found appropriate with respect to the new feature request.