RESTful Responses

Generic response format of BlobCity REST API

  "ack" : "1",
  "time" : 1000,
  "rows": 10,
  "p" : {

The response format contains an acknowledgement stating whether the response is a success response or a failure response. An ack value of 1 indicates a success response, while an ack value of 0 indicates a failure response.

The response always contains the time in milli seconds that the request took to process. This time is measured by the database and representative of the time it took for the database to execute the operation. It is not a measure of the end to end time required to full the request over a network, or to transport the response over the network. Network latencies are not counted in this time. The time response is not a benchmark of performance, but provided just for reference and for easy of identifying and diagnosis of any performance problems due to incorrect configurations.

Optionally the response contains the rows parameter. In case of SELECT queries the rows matches the number of records returned by SELECT query. In case of UPDATE, DELETE queries the rows corresponds to the number of rows updated or deleted respectively.

Each success response has an associated payload p that contains information relevant to the response. The payload can be either a JSON object or a JSON array depending on the type of the query against which this response is produced.

A failure response
In case of an error or failure in execution of the requested operation, the response contains an ack value of 0.

  "ack" : "0",
  "code" : "error-code",
  "message" : "error description message",

The failure / error response optionally contains an error code as marked by the code parameter. This is the internal database error number or code name provided by the database for the error that has occurred. The optional message parameter may provide a more humanly readable error explanation and may offer specific insights that help diagnose and fix the error.