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

Add more specific HTTP status codes to REST interface #3

Open
mjordan opened this issue Oct 2, 2018 · 2 comments
Open

Add more specific HTTP status codes to REST interface #3

mjordan opened this issue Oct 2, 2018 · 2 comments

Comments

@mjordan
Copy link
Owner

mjordan commented Oct 2, 2018

  • Return a 404 Not found if the resource identified in "Resource-ID" is not found by the persist plugin; do this for GET/HEAD and PATCH but not for PUT
  • Return a 409 Conflict is the resource identified by "Resource-Id" already exists and the method is PUT.
  • Return a 400 Bad Request if the "Resource-Id" header is not present in a request
@whikloj
Copy link
Contributor

whikloj commented Oct 9, 2018

I think the use of additional HTTP verbs seems cleaniest. You GET and if the response is 404 you can decide whether to request a check via PUT or POST.

@mjordan
Copy link
Owner Author

mjordan commented Oct 9, 2018

Yes, I agree. I'm going to delete my latest comment - I don't know what I was thinking... my comment was from the perspective of checking the fixity e.g. against Fedora, not Riprap's REST interface, which is intended to be used by clients such as Drupal to get information about the fixity check event... two different things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants