Create Database Variable

post

/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/variables

Creates a substitution variable in the specified application and database, and returns the created variable.

Request

Supported Media Types
Path Parameters
Body ()

Variable details.

Root Schema : Variable
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK

Variable created successfully, with links to get, edit, or delete.

Body ()
Root Schema : Variable
Type: object
Show Source

400 Response

Bad Request

Failed to create the variable. The application or database name may be incorrect, the JSON for the variable may be incorrect, or the specified variable name may already exist.

415 Response

Not Acceptable

The media type isn't supported or wasn't specified.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to create a variable for an Essbase cube.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

Script with cURL Command

call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/variables?links=none" -H Accept:application/json -H Content-Type:application/json -d '{"name": "OrclDSN", "value": "TBC_ORA"}' -u %User%:%Password%

Example of Response Body

{
  "name" : "OrclDSN",
  "value" : "TBC_ORA"
}
Back to Top