ids-specification icon indicating copy to clipboard operation
ids-specification copied to clipboard

Changing HTTP Statuscode from 200 to 204 for endpoints with not defined response bodies

Open janpmeyer opened this issue 1 year ago • 4 comments

In the specification for the HTTP-Bindings of the Contract Negotiation and TransferProcess exists some endpoints with no specified response body. (Endpoints are listed at the bottom, Contract Negotiation, Transfer Process) A clean solution is to introduce an empty response body and change the expected status code from 200 to 204.

Contract Negotiation Provider: negotiations/:id/request negotiations/:id/events negotiations/:id/agreement/verification negotiations/:id/termination

Contract Negotiation Consumer: negotiations/:id/offers negotiations/:id/agreement negotiations/:id/events

Transfer Process: transfers/:id/start transfers/:id/completion transfers/:id/termination transfers/:id/suspension

janpmeyer avatar Apr 12 '23 15:04 janpmeyer

Thanks @janpmeyer for raising this topic, we have discussed it in our working group call today. We agree that 204 is better and will change the document accordingly soon.

sebbader-sap avatar Apr 20 '23 08:04 sebbader-sap

We just need to figure out if the descriptions in https://www.rfc-editor.org/rfc/rfc9110#name-204-no-content conflict with the intended state transitions.

sebbader-sap avatar Apr 20 '23 09:04 sebbader-sap

It's a little bit late to introduce such changes (our fault), however, I have prepared an PR for it to speed up the discussion.

sebbader-sap avatar Feb 16 '24 17:02 sebbader-sap

Any reason why a response body (and thereby 200) would be required? If not, a 204 certainly reduces confusion.

sebbader-sap avatar Feb 16 '24 17:02 sebbader-sap