Create Server Variable

post

/essbase/rest/v1/variables

Creates a server substitution variable and returns details about it.

Request

Supported Media Types
Body ()

Variable details.

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

Response

Supported Media Types

200 Response

OK

Variable created successfully. Includes variable details and links to get, edit, or delete the variable.

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

400 Response

Bad Request

Failed to create variable. The JSON may be incorrect, or a variable with that 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 global variable on the Essbase Server.

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/variables?links=none" -H Accept:application/json -H Content-Type:application/json -d '{"name": "NextMonth", "value": "Oct"}' -u %User%:%Password%

Example of Response Body

{
  "name" : "NextMonth",
  "value" : "Oct"
}
Back to Top