|
Post by Ingo van Lil on Jun 15, 2021 7:50:09 GMT
Hi all, I've been tasked with implementing a Redfish service, and I'm a little unclear about a pretty basic point in the specification that will shape my entire design: - Can URIs address only resources, or can they also address properties in resources?
For most of the specification it seems like only resources are supposed to be URI-addressable. What threw me off is this part in section "9.9 POST (create)":
So it seems like the Members property should have its own URI. Is that an exception for this particular case, or is it true for all properties? What should be the result if a GET request is issued to that URI?
Thanks in advance, Ingo
|
|
|
Post by mraineri on Jun 15, 2021 13:23:26 GMT
Generally I have not seen properties as addressable with a URI, with that one exception for POST to "Members" in a collection. I would not expect a GET to be successful on Members.
OData support was put into Redfish early in the process, and OData does allow for the option for services to allow make individual properties addressable via a URI. However, OData also had a mandatory requirement with regards to creating new resource instances, which is where the behavior for performing a POST operation to the "Members" property came from; this is really an exception from how we do everything else in Redfish. Since Redfish first became a standard, I have not noticed great adoption of the OData feature set, and the focus on OData support has waned.
|
|
|
Post by Ingo van Lil on Jun 15, 2021 18:11:50 GMT
Thanks, that makes a lot of sense, and it makes my job easier.
Guess I'll simply implement *Collection/Members as a pointer to the collection itself. That way Collection and Collection/Members (and by consequence Collection/Members/Members/...) will be completely equivalent.
|
|
|
Post by Caffrey on Jul 7, 2021 5:51:04 GMT
Hi,
Thank you all for bringing this topic here. I also need a clarification about this exception. Since successful GET on Members is not expected, how service response will be more proper? like 405 or 404 or 400 error.
Thank you.
|
|
|
Post by Caffrey on Apr 13, 2022 1:56:10 GMT
Hi, Thank you all for bringing this topic here. I also need a clarification about this exception. Since successful GET on Members is not expected, how service response will be more proper? like 405 or 404 or 400 error. Thank you. Hi, Just a soft reminder. Please kindly give me a suggestion for above question. Thanks. The question is when use try to GET URI like "/redfish/v1/SessionService/Sessions/Members", which response code is proper. BR, Caffrey
|
|
|
Post by mraineri on Apr 14, 2022 19:03:44 GMT
I would expect a 405 in this case since the URI itself is valid, but GET is not an acceptable method to invoke on the URI. In the response, the Allow header would contain POST.
|
|
|
Post by Caffrey on Apr 18, 2022 2:12:25 GMT
Got it, thanks.
|
|