OLAP REST Commands : REST API Overview : Common REST Responses

Common REST Responses
When the Doradus Server starts, it listens to its REST port and accepts commands right away. However, if the underlying Cassandra database cannot be contacted (e.g., it is still starting and not yet accepting commands), REST commands that use the database will return a 503 Service Unavailable response such as the following:
HTTP/1.1 503 Service Unavailable
Content-length: 43
Content-type: Text/plain
 
Database is not reachable. Waiting to retry
When a REST command succeeds, a 200 OK or 201 Created response is typically returned. Whether the response includes a message entity depends on the command.
When a command fails due to user error, the response is usually 400 Bad Request or 404 Not Found. These responses usually include a plain text error message (similar to the 503 response shown above).
When a command fails due to a server error, the response is typically 500 Internal Server Error. The response includes a plain text message and may include a stack trace of the error.