Create Database Variable
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/variables
Creates a substitution variable in the specified application and database, and returns the created variable.
Request
- application/json
- application/xml
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
Variable details.
Response
- application/json
- application/xml
200 Response
OK
Variable created successfully, with links to get, edit, or delete.
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.
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"
}