International-Data-Spaces-Association / ids-specification

The Dataspace Protocol is a set of specifications designed to facilitate interoperable data sharing between entities governed by usage control and based on Web technologies. These specifications define the schemas and protocols required for entities to publish data, negotiate Agreements, and access data in a data space
https://docs.internationaldataspaces.org/dataspace-protocol/
Apache License 2.0
30 stars 14 forks source link

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

Open janpmeyer opened 1 year ago

janpmeyer commented 1 year ago

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

sebbader-sap commented 1 year ago

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 commented 1 year ago

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 commented 6 months ago

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 commented 6 months ago

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