Successful and Error Messages

Successful Messages

If the request is successful, HTTP calls to REST APIs return a message in the XML or JSON format, as follows:

{"success":
    {"message": "a successful message",
     "id": "an identifier"
    }
}

Where id refers to the identifier of the object concerned, such as a query, document, variable, or style. In some rare cases, id is not present.

Example

JSON Successful Message
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1 
Date: Tue, 13 Jan 2015 10:14:15 GMT
Content-Type: application/json
Content-Length: 204
{"success":
    {"message": "The resource of type \"Document\" with identifier \"16706\" has been successfully updated.",
     "id": "16706"
    }
}
Error Messages

If the request was unsuccessful, the call returns a message in the XML or JSON format, as follows:

<error>
    <error_code>An error code</error_code>
    <message>An error message</message>
</error>
The following table shows the possible Web Intelligence RESTful Web Service SDK error codes. Each of these codes addresses a category of error messages.
Error Code Description
WSR 00001 The user does not provide session token. The session is not found.
WSR 00002 The session token is invalid.
WSR 00100 A rule is not respected.
WSR 00101 An argument is not correct.
WSR 00102 The request body is malformed.
WSR 00400 The user tries to get a resource that does not exist.
WSR 00401 The user tries to create a resource that already exist.
WSR 00402 The user fails to access a resource.
WSR 00501 The user tries to perform an action that is not supported.
WSR 00999 This is an internal error.

The BI Semantic Layer RESTful Web Service SDK error codes are more specific. Each of these codes corresponds to a particular error message and to a specific error. See the Error Messages Explained guide for a detailed description of the error messages.

You can display the full error stack traces for debugging purpose by checking the Show Error Stack property for your WACS server in the CMC. See the Business Intelligence Platform Administrator Guide for the complete procedure.

Note The API reference chapters do not describe the call responses if an error occurs.

Example

400 Error Code
Content-Type: application/xml
HTTP Response Code: 404 
<?xml version="1.0" encoding="UTF-8"?>
<error>
    <error_code>WSR 00400</error_code>
    <message>The expression "[DUMMY]" cannot 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>WSR 00401</error_code>
    <message>The resource of type "Report" with identifier "154769" already has an inner resource of type "Data filter".</message>
</error>