|
Post by AMI_ivywang on Nov 28, 2022 15:41:25 GMT
Hi,
What is the correct status code and error message returned when the service does not support "Deep POST"?
1. POST /redfish/v1/AccountService/Accounts.Deep (Description in DSP0266 1.15.1, Deep POST (create))
Which will be the expected response? Status code 404 ResourceMissingAtURI or status code 405 MethodNotAllowed?
2. POST /redfish/v1/CertificateService/Actions/CertificateService.GenerateCSR.Deep ( Description in DSP0266 1.15.1, "Action URIs shall not support deep POST operations." )
Which will be the expected response? Status code 404 ResourceMissingAtURI or status code 405 MethodNotAllowed? Or it can just ignore ".Deep" in the end of URI?
Thanks, Ivy
|
|
|
Post by mraineri on Nov 28, 2022 15:51:37 GMT
If you do not support deep operations, the URIs themselves are not valid, therefore 404 would be returned in both cases. Don't simply ignore the ".Deep" portion of the URI.
|
|
|
Post by AMI_ivywang on Nov 28, 2022 16:16:50 GMT
Hi,
Thanks for the reply. Here're 2 more questions.
1. Can I think "{{any resource in the service except action resource}}.Deep" is a valid URI only when the operation is "PATCH"? (Service support "Deep PATCH")
2. So, should the following requests return 404 as well?
GET/PUT/DELETE "{{any resource in the service}}.Deep" For example: GET/PUT/DELETE /redfish/v1/.Deep
|
|
|
Post by mraineri on Nov 28, 2022 17:42:53 GMT
I wouldn't use "{{any resource in the service except action resource}}.Deep" as the judgement point for the HTTP response; thinking about things from an HTTP perspective, you still need to understand the contents of the braces to know whether or not to respond with a 404 vs 405.
So, for the case of "/redfish/v1/.Deep", I would expect a 404 if Deep PATCH is not supported on the service root.
|
|