Closed bolinocroustibat closed 1 week ago
Currently the endpoints of hydra are still not 100% REST.
The input should be changed as following:
GET
/api/resources
/api/resources/{resource_id}
PUT
api/resources/{resource_id}
DELETE
also, the responses should be changed as following:
POST
/api/checks
This will have some impact on udata so this probably should have a twin ticket on udata's side (cc @magopian )
PR: https://github.com/datagouv/hydra/pull/132
Currently the endpoints of hydra are still not 100% REST.
The input should be changed as following:
GET
to/api/resources
should not pass any resource payload in the body, but be aGET
on/api/resources/{resource_id}
PUT
to/api/resources
should be aPUT
to /api/resources/{resource_id}
with the same payloadDELETE
to/api/resources
should not pass a payload, but be aDELETE
on/api/resources/{resource_id}
also, the responses should be changed as following:
POST
to/api/resources
should answer a HTTP Created (201) instead of HTTP OK (200) with "created" as contentPUT
to/api/resources
should answer a HTTP OK (200) with empty body instead of HTTP OK (200) with "updated" as contentDELETE
to/api/resources
should answer a HTTP OK (200) with empty body instead of HTTP OK (200) with "deleted" as contentPOST
to/api/checks
should answer a HTTP Created (201) instead of HTTP OK (200)This will have some impact on udata so this probably should have a twin ticket on udata's side (cc @magopian )