|
Post by AMI_ivywang on Oct 10, 2022 10:57:00 GMT
Hi, Which one is the correct response when Get /redfish/v1/TaskService/TaskMonitors?
A. Return status code 404 with error message "Base.1.12.ResourceMissingAtURI"
B. Return status code 200 { "@odata.context": "/redfish/v1/$metadata#TaskCollection.TaskCollection", "@odata.etag": "\"1641096802\"", "@odata.id": "/redfish/v1/TaskService/TaskMonitors", "@odata.type": "#TaskCollection.TaskCollection", "Description": "Task Monitor Collection", "Members": [], "Members@odata.count": 0, "Name": "Task Monitor Collection" }
Thanks, Ivy
|
|
|
Post by mraineri on Oct 10, 2022 12:19:35 GMT
404 is the correct response; there is no "TaskMonitor" collection defined in the model. The task monitor URIs are special URIs for clients that invoked the operation and the URI is to be treated as opaque; these URIs are not resource URIs and are considered outside of the data model. Our examples tend to prefix these URIs with "/redfish/v1/TaskService/TaskMonitors" for the sake of convenience.
|
|
|
Post by ginugeorge on Oct 11, 2022 7:12:30 GMT
404 is the correct response; there is no "TaskMonitor" collection defined in the model. The task monitor URIs are special URIs for clients that invoked the operation and the URI is to be treated as opaque; these URIs are not resource URIs and are considered outside of the data model. Our examples tend to prefix these URIs with "/redfish/v1/TaskService/TaskMonitors" for the sake of convenience. Does this mean we no need to support the Task Monitor Collection URI itself and that it should return 404 Not Found at all times ?{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_8.Message",
"Message": "The resource at the URI '/redfish/v1/TaskService/TaskMonitors' was not found.",
"MessageArgs": [
"/redfish/v1/TaskService/TaskMonitors"
],
"MessageId": "Base.1.12.ResourceMissingAtURI",
"Resolution": "Place a valid resource at the URI or correct the URI and resubmit the request.",
"Severity": "Critical"
}
],
"code": "Base.1.12.ResourceMissingAtURI",
"message": "The resource at the URI '/redfish/v1/TaskService/TaskMonitors' was not found."
}
}
or when the user initiates an asynchronous operation, we can list the Task Monitor Collection as shown below with 200 Ok as the Status Code ?{
"@odata.context": "/redfish/v1/$metadata#TaskCollection.TaskCollection",
"@odata.etag": "\"1665166939\"",
"@odata.id": "/redfish/v1/TaskService/TaskMonitors",
"@odata.type": "#TaskCollection.TaskCollection",
"Description": "Task Monitor Collection",
"Members": [
{
"@odata.id": "/redfish/v1/TaskService/TaskMonitors/1"
}
],
"Members@odata.count": 1,
"Name": "Task Monitor Collection"
}
|
|
|
Post by mraineri on Oct 11, 2022 13:00:42 GMT
There is no such thing as a task monitor collection. Task monitor URIs are opaque, just like any other non-resource URI (for example, BinaryDataUri in Assembly). For the sake of convenience, we tend to prefix the URI with "/redfish/v1/TaskMonitors" to highlight they are task monitor URIs.
The task monitor URIs could be anything outside of the data model; they don't even necessarily need to be prefixed with "/redfish/v1".
|
|