REST API - HTTP status for a partial response
问题 I encounter the following case: I have an API that allows me to retrieve a unique resource: GET myapi/resource_id If this resource does not exist, I return a 404 HTTP status code. This API also allows to retrieve several resources via the same request: GET myapi/resource_id1,resource_id2 Which HTTP status code should I send back if one of the two resources does not exist? 200 with an explanation in the JSON in an error key 206 which allows to be more explicit with an explanation in the JSON