Skip to main content

GET – Task properties

Use the GET method to retrieve properties in Task resource for Redfish service.

Request URL

GET https://<BMC_IPADDR>/redfish/v1/TaskService/Tasks/{Id}

Request body

None

Response body

FieldTypeDescription

Id

String

The Id property uniquely identifies this task resource.

Name

String

Task {Id}

Description

String

This resource represents a task for a Redfish implementation.

TaskState

String

The state of the task.

StartTime

String

The date-time stamp that the task was last started.

EndTime

String

The date-time stamp that the task was last completed.

Messages

Object

Expanded.

 

Messages[N]

String

A message associated with the task..

PercentComplete

Integer

This property shall indicate the completion progress of the task, reported in percent of completion.

TaskStatus

String

The completion status of the task.

The mapping between TaskState and TaskStatus:
  • “Completed” (TaskState) –> “OK” (TaskStatus)

  • “Killed”(TaskState) –> “Warning”(TaskStatus)

  • “Exception”(TaskState) –> “Warning”(TaskStatus)

  • Others (TaskState) –> Do not expose TaskStatus (TaskStatus)

TaskMonitor

Link

The URI of the Task Monitor for this task. It is a URI for deleting the task when the TaskState is Completed, Exception or Killed.

HidePayload

Boolean

This property shall indicate whether the contents of the payload should be hidden from view after the task has been created.

Status code

HTTP Status CodeError Message ID
500InternalError

Example

The following example JSON response is returned:

{
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"@odata.etag": "\"0B755D5E\"",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"@odata.type": "#Task.v1_4_3.Task",
"Description": "This resource represents a task for a Redfish implementation.",
"EndTime": "2024-11-30T05:49:59+00:00",
"HidePayload": true,
"Id": "1",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has started.",
"MessageArgs": [
"1"
],
"MessageId": "TaskEvent.1.0.3.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '1' has completed.",
"MessageArgs": [
"1"
],
"MessageId": "TaskEvent.1.0.3.TaskCompletedOK",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 1",
"PercentComplete": 100,
"StartTime": "2024-11-30T05:46:48+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/1",
"TaskState": "Completed",
"TaskStatus": "OK"
}