Success and Error Messages

In case of success, HTTP calls to RESTful Web Service SDK methods return a message of the following format:

<success>
    <message>A successful message</message>
    <id>An identifier</id>
</success>

Where the <id> element contains the identifier of the object concerned, such as query, document, variable, or style.

In case of error, the call returns a message of the following format:

<error>
    <error_code>An error code</error_code>
    <message>An error message</message>
</error>
Note The API reference chapters do not describe the XML outputs returned by the methods in case of error.
The following table shows the possible error codes.
Error Code Description
001 The user does not provide session token. The session is not found.
002 The session token is invalid.
100 A rule is not respected.
101 An argument is not correct.
102 The request body is malformed.
400 The user tries to get a resource that does not exist.
401 The user tries to create a resource that already exist.
501 The user tries to perform an action that is not supported.
999 This is an internal error.

Example

400 Error Code
Content-Type: application/xml
HTTP Response Code: 404 
<?xml version="1.0" encoding="UTF-8"?>
<error>
    <error_code>400</error_code>
    <message>The expression '[DUMMY]' can not be found in the document dictionary.</message>
</error>

Example

401 Error Code
Content-Type: application/xml
HTTP Response Code: 400 
<?xml version="1.0" encoding="UTF-8"?>
<error>
    <error_code>401</error_code>
    <message>The resource of type 'Report' with identifier '154769'
        already has an inner resource of type 'Data filter'.</message>
</error>