Responses

The response from the API follows the same basic structure accross all methods and regardless of the format type. The status element indicates whether the request succeded or failed and the result contains the requested resource.

Encoding

All responses will use UTF-8 encoding, and all content in the returned data will be HTML encoded.

Successes

A successful response will generally look like the following:

XML

<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>ok</status>
  <result>
    ...
  </result>
</response>

JSON

{
  "status": "ok",
  "result": {
    ...
  }
}

Errors

Responses that fail contain one or more error results with a code and message indicating the error. Generally they will be in the following format:

XML

<?xml version="1.0" encoding="utf-8"?>
<response>
  <status>error</status>
  <result>
    <error>
      <code>2</code>
      <message>ResourceNotFound - Item could not be found.</message>
    </error>
    ...
  </result>
</response>

JSON

{
  "status": "error",
  "result": [
    {
      "code": 2, 
      "message": "ResourceNotFound - Item could not be found."
    }
  ]
}

Error Codes

While an API method might have specific error codes these are the errors that can occur globally.

Code Message
1 Maintenance - Site is down for maintenance and will be back shortly.
3 OverQueryLimit - Too many concurrent requests were detected coming from this ip. Please try to limit the number of requests you make per second.
400 InvalidParameter - Request is either missing a required parameter or parameter is of an invalid type.
404 NotFound - No page or resource matching the URI given.
500 InternalError - The server encountered an unexpected condition which prevented it from fulfilling the request.
Yes No