|
Post by AMI_ivywang on Oct 10, 2022 10:46:22 GMT
Hi, Refer to the example in the section 11.1 Task management (https://www.dmtf.org/sites/default/files/standards/documents/DSP2060_1.0.0.pdf) When the task is still in progress( TaskState is New, Running, etc.), should the response body of Task and TaskMonitor be the same?
For example: POST /redfish/v1/Systems/Self/Actions/ComputerSystem.Reset Response Status code 202 Response Headers - Location: /redfish/v1/TaskService/TaskMonitors/2 Response Body - @odata.id: /redfish/v1/TaskService/Tasks/2
Get /redfish/v1/TaskService/TaskMonitors/2 Response status code 202 Response Body { "@odata.context": "/redfish/v1/$metadata#Task.Task", "@odata.etag": "\"1641014407\"", "@odata.id": "/redfish/v1/TaskService/Tasks/2", "@odata.type": "#Task.v1_4_2.Task", "Description": "Task for Systems Self Reset Maintenance Window Task", "Id": "2", "Name": "Systems Self Reset Maintenance Window Task", "StartTime": "2022-01-01T00:20:07-05:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/2", "TaskState": "Pending", "TaskStatus": "OK" }
Get /redfish/v1/TaskService/Tasks/2 Response status code 200 Response Body { "@odata.context": "/redfish/v1/$metadata#Task.Task", "@odata.etag": "\"1641014407\"", "@odata.id": "/redfish/v1/TaskService/Tasks/2", "@odata.type": "#Task.v1_4_2.Task", "Description": "Task for Systems Self Reset Maintenance Window Task", "Id": "2", "Name": "Systems Self Reset Maintenance Window Task", "StartTime": "2022-01-01T00:20:07-05:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/2", "TaskState": "Pending", "TaskStatus": "OK" }
Thanks, Ivy
|
|
|
Post by mraineri on Oct 10, 2022 12:18:15 GMT
While the task is still in progress, the response body will be the same for the Task resource URI and the task monitor URI, but the HTTP status codes will be different.
|
|