API Response Reference
Overview
By default all responses sent from the API will be in
formatted as XML. In addition to XML all services may be
instructed to return JSON which can be used directly by any
JavaScript engine. The beginning of every successful response
will always contain the about section, followed by the
data produced by the service that was called. If for some
reason an error was to occur, the returned response will not
contain a response section and will instead contain a message
section describing the error. The following table defines the
errors that can be returned by the API.
| TW Code | HTTP Status Code | Message | Explanation |
| 1xx - Client Authentication/Authorization Errors |
| 101 | 400 | 'No token' |
An authentication token was not included as the first node of the request path.
|
| 102 | 403 | 'Invalid token' |
The token included with the request as the first node is not authenticated
to use the system. The most common causes of this are a simple typo, or the
email confirmation has not been completed. The system will return this
error until the confirmation is complete.
|
| 110 | 403 | 'No Auth For Service' |
The TOKEN specified in the request path is not authenticated to use the
service specified.
|
| 2xx - Client Request Errors |
| 200 | 404 | 'No Such Service' |
The service specified in the request path does not exist in the TextWise API.
|
| 210 | 400 | 'Invalid Argument' |
The service requested could not execute correctly because of a missing/invalid
parameter or setting.
|
| 211 | 400 | 'Invalid URI' |
The URI sent to the API as a parameter is malformed. Web Page URLs sent via
the URI parameter must start with http:// to be valid.
|
| 212 | 400 | 'Invalid Format' |
The format parameter specified an invalid format for the requested service.
|
| 221 | 400 | 'No input' |
No valid content was indicated. This
can mean no URI, content parameter, or request body was sent. It can also mean
that the content was too short for the service to use.
|
| 222 | 400 | 'Invalid Input' |
There was input found in the request. However, it was either malformed,
binary, or not encoded in such a way that it is usable by the system.
|
| 223 | 413 | 'Maximum Length Exceeded' |
Your request has exceeded our system's configured maximum content length.
To prevent this from happening you should write your program to limit
content sent to no more than 1000 characters for a GET request, and no more
than 200,000 characters for a POST or PUT request.
|
| 224 | 400 | 'Offset Out Of Range' |
Only applicable to match requests. This indicates you have provided a
result offset that is too large for the index you are matching against.
|
| 3xx - Client Limit Errors |
| 300 | 509 | 'Over load limit' |
Your requests to the API have exceeded the speed limit of 5 requests
per second. You should code your application to rate-limit your requests.
|
| 301 | 509 | 'Over minute limit' |
The number of requests to the API have exceeded the limit of 300 requests
per minute.
|
| 302 | 509 | 'Over hour limit' |
Then number of requests to the API have exceeded the limit of 10,000
requests per hour.
|
| 303 | 509 | 'Over day limit' |
The number of requests to the API have exceeded the limit of 20,000
requests per day.
|
| 304 | 509 | 'Over month limit' |
The number of requests to the API have exceeded the licensed limit of monthly requests.
|
| 305 | 509 | 'Over total limit' |
The number of requests to the API have exceeded the total limit of requests.
|
| 4xx - Server Errors |
| 400 | 503 | 'API Not Available' |
The API is offline. This could be due to any number of reasons but is most
likely due to a short maintenance task. If this error occurs, just try again
at a later time.
|
| 401 | 400 | 'Unknown IO Error' |
An unknown I/O error has occurred.
|
| 411 | 502 | 'Failure Fetching Content' |
The Content indicated by the URL specified in the request could not be
retrieved.
|
| 412 | 422 | 'No Significant Words' |
The provided content does not have enough words to produce a meaningful result.
|
| 413 | 409 | 'Update In Progress' |
A previously sent index update is being processed by the system and this live
update can not be performed at this time.
|
| 414 | 412 | 'Too Many Items For Live Update' |
A live update has be requested with more items then the configured maximum
for your index. The update will not be performed.
|
| 415 | 400 | 'XML Schema or Parsing Error' |
The uploaded XML file for an index update can not be parsed, does not
comply to the index upload schema, or contains data that does not comply
with the file format associated with uploaded file's extension.
|
| 416 | 509 | 'Over capacity and trying to add items' |
The index that the user is trying to add items to has reached it's
maximum capacity. No more items can be added to the index until
some of the existing items are deleted using a file upload that
contains DELETE operations for the items to remove.
|
| 417 | 404 | 'Item not found for match request' |
No item was found for the sourceContentId or sourceExternalId
parameter used in an
index item input match call.
|
XML Error Response Example
<response>
<message code="103" string="Invalid token"/>
</response>
JSON Error Response Example
{
"message" : {
"messageCode" : "103",
"messageText" : "Invalid token"
}
}