Create Location Alias

post

/essbase/rest/v1/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

Supported Media Types
Path Parameters
Body ()

Location alias definition details.

Root Schema : LocationAliasBean
Type: object
Show Source
  • Name of the location alias.

  • If the location alias is based on a saved connection, this parameter should be true if the connection is application-level, or false if the connection is globally defined.

  • Application name for the database/cube to which the location alias refers.

  • If the location alias is based on a saved connection, the name of the connection.

  • Name of the database to which the location alias refers.

  • links
  • If the location alias is not based on a saved connection, the Essbase Server host name of the database/cube to which the location alias refers.

  • If the location alias is not based on a saved connection, the name of a user who is authorized to log in to serverName. Optional if both cubes are on the same Essbase Server.

Back to Top

Response

Supported Media Types

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