Set Currency Settings

post

/applications/{applicationName}/databases/{databaseName}/currencySettings

Updates the currency settings for the database.

Request

Path Parameters
Back to Top

Response

204 Response

OK

Currency settings updated successfully.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to modify currency settings for the main cube using the Essbase REST API.

To build a sample currency application and cubes like those used in this example,

  1. In the Essbase files catalog, copy LCM_Sample_Currency.zip from the gallery to your user directory or a shared directory.

  2. Run an Import LCM job to build the application and cubes. Sample.Interntl is the main cube, and Sample.Xchgrate is the currency cube.

  3. The main sample cube, Interntl, is already set up and has a currency cube already (Xchgrate). However, to set up your own main cube, you would use this API endpoint to update the required and optional currency settings.

  4. To learn the rest of the requirements about setting up currency conversion, refer to Structure of Currency Applications and its adjacent topics.

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_Currency/databases/Interntl/currencySettings -H "Accept:application/json" -H "Content-Type: application/json" --data "@./currencySettings.json" -u %User%:%Password%

Input JSON

The following example shows the contents of the payload in currencySettings.json:

{
  "currencyDatabase" : "Xchgrate",
  "conversionType" : "division",
  "conversionTypeMemberName" : "Act xchg",
  "countryMemberName" : "Market",
  "timeMemberName" : "Year",
  "partitionMemberName" : "Scenario"
}
Back to Top