|
Post by AMI_Mani on May 13, 2019 18:59:33 GMT
Hi All, As per Query parameters, Filter is applicable to collection URI only as per redfish specification based on below information available
Include a subset of the members of a collection based on the expression specified in the query parameters for this option - http://resourcecollection?$filter=SystemType eq 'Physical'
So if user is trying to give filter query parameter to Instance uri, it can return 501 as per below information in Specification
If the service receives a $filter query parameter that is not supported, it shall reject the request and return HTTP Status code 501.
Please confirm whether $filter query parameter is applicable to collection URI only or supported for both Collection, Instance URI
Thanks, Mani
|
|
|
Post by j2hilland on May 14, 2019 19:31:30 GMT
If your point is that a 400 (Bad Request) would be more appropriate, I think you have a point. 501 should really be reserved for if the service doesn't support it at all. This can be determined by ProtocolFeaturesSupported.FilterQuery in the service root but a 501 does seem inappropriate when the client made a mistake by trying to filter a single instance. I would think a 400 would be more appropriate for single instances. The spec currently says everything is a 501 though, so we will see what we can do to bring it in alignment with HTTP expected semantics.
|
|
|
Post by ansondrain on Jun 26, 2019 12:02:12 GMT
I got same question as Mani's in my implementation. Could client perform $filter query on those instance resources with array-value properties? for example: use $filter=Voltages/SensorNumber eq 192 to retrieve all matched voltage sensors
Thanks Anson
|
|