Cognos Dynamic Cubes HTTP response structure
The IBM® Cognos® Dynamic Cubes HTTP response is described here.
Response code
The response code from a Cognos Dynamic Cubes request
is always 200
or 201
. A different
response code may be returned if the request path is malformed or
the Cognos Dynamic Cubes
API is not available. All information, including errors or warnings,
is included in the entity-body of the response.
Response headers
The response headers contain
the standard information about the server, cookies, and so on. There
is also a Content-Type: application/json;charset=utf-8
header.
Entity-body
The entity-body consists of a JSON object that contains the response to a request, including any error or warning messages.
If the request is to create an object, then the response consists of an identifier that can be used to refer to the object in subsequent requests, such as requests that create child objects or updating the properties of the object. A sample response is shown here.
{
"id": "a36907c1f796426a96b6749d0651c0cd"
}
A request to retrieve the properties of a data source returns a JSON object such as the following.
{
"schema": "gosales",
"queryProcessing": "databaseOnly",
"queryType": "relational",
"functionSetId": "V_SQLServer",
"catalog": "GOSALES",
"rollupProcessing": "unspecified",
"name": "great_outdoors_sales",
"cmDataSource": "great_outdoors_sales",
"cube": "",
"interface": "SS"
}
The data that is returned is described in the documentation for the individual commands.
A request returns an empty JSON object if the command ran and no response is needed.
If errors
are encountered when you attempt to run a request, the response contains
an array that is called errors
that contains any
error messages, such as the following.
{
"errors": [
"Unable to find model object for ID: 62613913c45e47be80de79340effde9"
]
}
If there any warnings that are generated
by the request, they are contained in a warnings
array.