Merge pull request #4493 from hashicorp/d-http-codes

Document HTTP response codes
This commit is contained in:
Alex Dadgar 2018-07-16 14:44:39 -07:00 committed by GitHub
commit d6b271c4fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -196,3 +196,15 @@ GET /v1/jobs
Even though these share a path, the `PUT` operation creates a new job whereas
the `GET` operation reads all jobs.
## HTTP Response Codes
Individual API's will contain further documentation in the case that more
specific response codes are returned but all clients should handle the following:
* 200 and 204 as success codes.
* 400 indicates a validation failure and if a parameter is modified in the
request, it could potentially succeed.
* 403 marks that the client isn't authenticated for the request.
* 404 indicates an unknown resource.
* 5xx means that the client should not expect the request to succeed if retried.