Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect doc on HTTP methods to the SDMX REST API for Structural Metadata maintenance #167

Open
dosse opened this issue May 30, 2022 · 1 comment

Comments

@dosse
Copy link
Contributor

dosse commented May 30, 2022

It seems that the final doc about HTTP methods to the SDMX REST API for Structural Metadata maintenance misses the creation of artefacts through the PUT keyword. This was still part of the TWG version agreed of 14/01/2020: 2020.01.14-sdmx-rest-51.pdf as it was aligned with the HTTP standard which says:

The PUT method requests that the enclosed entity be stored under the
supplied Request-URI. If the Request-URI refers to an already
existing resource, the enclosed entity SHOULD be considered as a
modified version of the one residing on the origin server. If the
Request-URI does not point to an existing resource, and that URI is
capable of being defined as a new resource by the requesting user
agent, the origin server can create the resource with that URI. If a
new resource is created, the origin server MUST inform the user agent
via the 201 (Created) response.
If an existing resource is modified,
either the 200 (OK) or 204 (No Content) response codes SHOULD be sent
to indicate successful completion of the request.

https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.4 says:

The PUT method requests that the state of the target resource be
created or replaced with the state defined by the representation
enclosed in the request message payload. (...)
If the target resource does not have a current representation and the
PUT successfully creates one, then the origin server MUST inform the
user agent by sending a 201 (Created) response.
If the target
resource does have a current representation and that representation
is successfully modified in accordance with the state of the enclosed
representation, then the origin server MUST send either a 200 (OK) or
a 204 (No Content) response to indicate successful completion of the
request.

I do not have any record why the creation through PUT was dropped, but it doesn't seem correct.

@stratosn
Copy link
Member

stratosn commented Jun 8, 2022

Hi @dosse , the decision of the TF4 group was to keep things as simple as possible, thus allowing not too many options for any given action. Nevertheless, we could review and enrich the available options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Change proposed
Development

No branches or pull requests

3 participants