Responses

Zerista suppports returning results using JSON and in some cases the Atom Syndication Format. In general you should use JSON.

Zerista responds to all requests in a RESTful approach in the format that you have requested.  The status of each response is returned using standard HTTP codes.

HTTP Status Code Description
200 – OK Success.
203 – Non-Authoritative The object was added to the conference but was not changed since it already existed.
301 – Moved Permanently This should never be given on an API request, check the Accept header or format query variable in your request.
302 – Found This should never be given on an API request, check the Accept header or format query variable in your request.
400 – Bad Request Malformed HTTP request.
401 – Unauthorized Invalid signature.
403 – Forbidden Access denied. Contact Zerista to verify your permissions.
404 – Not Found Incorrect/invalid URI.
405 – Method Not Allowed Verify that you are using the correct HTTP method.
406 – Not Acceptable Verify you are requesting a valid MIME type.
422 – Unprocessable Entity Indicates the request was rejected because of invalid data (e.g. an invalid email address or attempting to create a user that already exists). The response will include information as to the exact cause of the rejection.
500 – Server Error See the HTTP response for the detailed error message. Contact Zerista and include details of the time and parameters of the request if you do not understand the error.

You must select the format you would like for the response data in each request. You can do this by including the appropriate HTTP Accept header (recommended) or adding a format query variable to the request URI (eg, ?format=json).If you do not include one of these, the response will be the default HTML response for the web application, which will be standard HTML (not useful for API work) or may be a redirect.

Format Accept Header Query Variable
Atom application/atom+xml format=atom
JSON application/json format=json

In almost all cases you will want to use the JSON response type.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s