openreferral / api-specification

This is the working repository for Open Referral's Human Services Data API protocols.
https://openreferral.readthedocs.io/en/latest/hsda/
Other
29 stars 13 forks source link

HTTP Status Codes #48

Closed kinlane closed 3 years ago

kinlane commented 7 years ago

Provide guidance on HTTP Status codes to be returned. Add all relevant HTTP Status Codes to individual endpoints using the OpenAPI.

tuckerbuchy commented 7 years ago

I think a key one here is 304, which is used for reducing the amount of data transferred (https://httpstatuses.com/304).

We should just duplicate the 200 response.

NeilMcKLogic commented 7 years ago

This was already discussed in an earlier topic. There are interesting error codes beyond just 200 and 404 we should implement. @kinlane I believe you articulated them in that other topic.

kinlane commented 7 years ago

So two elements here:

1) HTTP Status codes - Which status codes are returned as part of each response. 2) Error Codes (#47) - When a 500, or other error is encountered, what is returned. What is the structure of the message returned, and what does it contain. It won't be any of the HSDS schema.

When v1.2 draft is ready I will be spending time evaluating what next wave beyond just 200, and 400 should be returned. Along with Error codes for 500, along with any corresponding error status codes -- including 304 to my working list as @tuckerbuchy suggested.

kinlane commented 3 years ago

We will be providing the following guidance for v2 on status codes -- the OpenAPI will reflect hat.

GET

POST

PUT

DELETE