GET – 任务属性
使用 GET 方法检索 Redfish 服务的 Task 资源中的属性。
请求 URL
GET https://<BMC_IPADDR>/redfish/v1/TaskService/Tasks/{Id}
请求正文
无
响应正文
字段 | 类型 | 描述 | ||||||
---|---|---|---|---|---|---|---|---|
Id | 字符串 | Id 属性用于唯一标识此任务资源。 | ||||||
Name | 字符串 | “Task {Id}” | ||||||
Description | 字符串 | “This resource represents a task for a Redfish implementation.” | ||||||
StartTime | 字符串 | 上次启动任务的日期时间戳。 | ||||||
EndTime | 字符串 | 上次完成任务的日期时间戳。 | ||||||
HidePayload | 布尔 | 此属性应指示在创建任务后是否应隐藏有效负载的内容。 | ||||||
PercentComplete | 整数 | 此属性应指示任务的完成进度(以完成百分比进行报告)。 | ||||||
TaskMonitor | 链接 | 此任务的任务监控器的 URI。这是在 TaskState 为 Completed、Exception 或 Killed 时用于删除任务的 URI。 | ||||||
TaskState | 字符串 | 任务的状态。 | ||||||
TaskStatus | 字符串 | 任务的完成状态。 TaskState 和 TaskStatus 之间的映射关系:
| ||||||
Messages | 对象 | 展开。 | ||||||
Messages[N] | 字符串 | 与任务关联的消息。 |
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
500 | InternalError |
示例
返回以下示例 JSON 响应:
{
"StartTime": "2019-11-12T15:05:12+00:00",
"@odata.id": "/redfish/v1/TaskService/Tasks/e809efa4-0e8f-48fc-86d9-6d4c5b0d2da0",
"Messages": [
{
"@odata.type": "#Message.v1_0_7.Message",
"MessageArgs": [
"e809efa4-0e8f-48fc-86d9-6d4c5b0d2da0"
],
"Message": "The task with id e809efa4-0e8f-48fc-86d9-6d4c5b0d2da0 has completed.",
"Severity": "OK",
"Resolution": "None.",
"MessageId": "TaskEvent.1.0.TaskCompletedOK"
},
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Successfully Completed Request",
"MessageArgs": [
null
],
"Severity": "OK",
"Resolution": "None",
"MessageId": "Base.1.5.Success"
},
{
"@odata.type": "#Message.v1_0_7.Message",
"MessageArgs": [
"1",
"/redfish/v1/UpdateService/FirmwareInventory/BMC-Primary",
"BMC-TEI3-10",
"57B-1.20",
"57B-1.20"
],
"Message": "Assignment 1: Resource /redfish/v1/UpdateService/FirmwareInventory/BMC-Primary SoftwareID BMC-TEI3-10 Version 57B-1.20 to Version 57B-1.20.",
"Severity": "OK",
"Resolution": "None",
"MessageId": "LenovoFirmwareUpdateRegistry.1.0.UpdateAssignment"
},
{
"@odata.type": "#Message.v1_0_7.Message",
"Message": "Assignment 1: Apply complete",
"MessageArgs": [
"1"
],
"Severity": "OK",
"Resolution": "None",
"MessageId": "LenovoFirmwareUpdateRegistry.1.0.PayloadApplyCompleted"
}
],
"Id": "e809efa4-0e8f-48fc-86d9-6d4c5b0d2da0",
"HidePayload": true,
"Name": "Task e809efa4-0e8f-48fc-86d9-6d4c5b0d2da0",
"PercentComplete": 100,
"TaskStatus": "OK",
"TaskMonitor": "/redfish/v1/TaskService/fdcf8893-817e-4a6a-b990-264123ba4004",
"TaskState": "Completed",
"EndTime": "2019-11-12T15:06:33+00:00",
"@odata.etag": "\"1573571193473\"",
"@odata.type": "#Task.v1_4_1.Task",
"Description": "This resource represents a task for a Redfish implementation."
}
提供反馈