|
Post by AMI_ivywang on Jan 18, 2024 16:52:33 GMT
Hi, Refer to the Redfish Specification DSP0266 Version 1.15.1, We support both 'POST {resource collection URL}' and 'POST {resource collection URL}/Members' to adds a member. 1. Are the responses (marked in red) correct for ' {resource collection URL}/Members' when the 'Response Headers - Allow' of { resource collection URL} is ' GET, POST'? For example: GET /redfish/v1/AccountService/Accounts >> Response Headers - Allow: " GET, POST" GET/PATCH/DELETE /redfish/v1/AccountService/Accounts/ Members >> status code 405 >> Response Headers - Allow: " POST" 2. Are the responses (marked in red) correct for '{resource collection URL}/Members' when the 'Response Headers - Allow' of {resource collection URL} is ' GET'? For example: GET /redfish/v1/Registries >> Response Headers - Allow: " GET" GET/PATCH/POST/DELETE /redfish/v1/AccountService/Accounts/Members >> status code 404 "Base.1.12.InvalidURI"
|
|
|
Post by mraineri on Jan 18, 2024 17:10:12 GMT
For question 1, yes, that's looks like a correct response. While Redfish only requires POST on /Members to maintain minimal OData conformance, OData allows you to support other operations if you see a need to grow into the more "generic OData" space.
For question 2, technically the correct response would be a 405 Method Not Allowed since "/redfish/v1/AccountService/Accounts/Members" is a valid URI to meet the requirement highlighted in the previous question.
|
|
|
Post by AMI_ivywang on Jan 18, 2024 19:14:14 GMT
Hi,
Thanks for the reply. One more question.
When the {resource collection URL} does not allow operation "POST", is '405 Method Not Allowed' a correct response for 'GET/PATCH/POST/DELETE {resource collection URL}/Members'?
For example: GET /redfish/v1/Registries >> Response Headers - Allow: "GET". Can find property "Members" in the response body. GET/PATCH/POST/DELETE /redfish/v1/Registries/Members >> "405 Method Not Allowed" or "404 Base.1.12.InvalidURI"?
|
|
|
Post by mraineri on Jan 18, 2024 19:47:31 GMT
Technically 405 would be more correct. However, we don't have a lot of detail in this space as it is, and I can see how the design of the web server could make this harder and thus you'd need to use 404.
In the end, I don't see using a 404 as really detrimental. I haven't come across Redfish users making use of this OData feature anyway.
|
|
|
Post by elijahliang on Jan 22, 2024 6:28:00 GMT
In the Redfish specification, there is a description that says the following:
Can we consider that the implementation you mentioned above violates the specification?
|
|
|
Post by mraineri on Jan 22, 2024 15:37:43 GMT
Technically yes since the wording does imply an aliasing of "<URI>/Members" to "<URI>", but the reality is since this is largely unused functionality on the client side of things, it's pretty harmless in the grand scheme of things.
|
|