Reference Guide

REST responses
Topics:
Response components
HTTP response headers
HTTP status codes
JSON collection response body
JSON instance response body
JSON create response body
Response with no body
JSON job response body
Error response
Response components
Each response to a REST API request consists of a response header, HTTP status code (in the response header), and JSON
response body, if applicable:
The response header contains metadata about the response being sent.
The HTTP status code in the response header indicates whether a request is successful or unsuccessful.
An HTTP status code in the 2xx family, such as 200 OK or 201 Created, indicates a correctly processed request.
An HTTP status code in the 4xx family indicates an error in the request. For example, a 400 status code indicates a badly
formed request, and a 401 status code indicates an authorization error.
An HTTP status code in the 5xx family indicates a server failure. For example a 500 status code indicates an internal
server error, and a 503 status code indicates that the REST service is temporarily unavailable.
The JSON response body varies according to the request type and whether a request was successful. For example, a
collection response body is returned in response to a successful GET collection request, and an instance response body is
returned in response to an instance request.
HTTP response headers
A response from the REST API always includes HTTP response headers that contain metadata about the response being sent.
The following HTTP headers appear in every REST API response:
Table 2. HTTP response headers in the REST API
HTTP header Description
Content-Type This header is set to application/json, although it can be application/zip,
document/text, or application/binary.
Content-Length This header refers to the byte length of the HTTP body.
Set-Cookie The login session ticket (auth_cookie) is returned in the first request of the session
and required for all subsequent requests, unless you pass the user ID and password with
each request. Because the API uses cookie-based authentication, the HTTP client must
support cookies in order to use the API.
For more information, see Connecting and authenticating.
DELL-EMC-TOKEN Before issuing any REST call which changes the state of the object (such as POST,
PATCH or DELETE) send a GET request to receive a CSRF token as response header
3
REST responses 13