Create Location Alias

post

/applications/{applicationName}/databases/{databaseName}/locationaliases

Create a new location alias in the given application and database (cube).

A location alias is a named pointer to the location of another cube. You can define the alias using a saved connection or embed the details of the secondary cube within the definition. You should create location alias on the cube from which the calculation scripts are run.

Request

Path Parameters
Back to Top

Response

204 Response

OK

Location alias created successfully.

400 Response

Bad Request

Failed to create location alias.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to define a location alias on the Essbase database (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

The following script creates the location alias named EasternDB on Sample Basic.

call properties.bat
curl -X POST https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/databases/Basic/locationaliases -H "Accept:application/json" -H "Content-Type:application/json" --data "@./locationaliasdef.json" -u %User%:%Password%

Example of Request Body

The input file, locationaliasdef.json, consists of the following JSON information.

{
  "aliasName" : "EasternDB",
  "applicationLevelConnection" : "false",
  "applicationName" : "Eastern",
  "databaseName" : "Sales",
  "serverName" : "https://myserver.example.com:9001/essbase/agent",
  "userName" : ""
}

Example of Response Body

A response is returned if there is an error; for example,

{
  "errorMessage" : "Location alias EasternDB already exists",
  "errorCode" : 1023069
}
Back to Top