REST API Introduction - Response Formats
The root element response is the root object returned (for example: in JSON, the response returned is the object value of the response node). Any malformed or otherwise incorrect request may result in an HTTP error code.
- Responses to POST requests will be an HTTP 201 status code and a location header.
- Responses to PUT requests will be either the JSON representation of the updated resource, as for a GET, or an HTTP 204.
- Responses to DELETE requests will either be a 202 or a 204.
- Responses to GET requests are always returned as an object containing an "entry" slot, which in turn contains a list of JSON objects.
For a collection of items:
{ "entry" : [
{...first item...},
{...second item...}
...
]
}
For a single item:
{ "entry" :
{...item...}
} 