Set Currency Settings
/applications/{applicationName}/databases/{databaseName}/currencySettings
Updates the currency settings for the database.
Request
-
applicationName(required):
Application name.
-
databaseName(required):
Database name.
Response
204 Response
OK
Currency settings updated successfully.
500 Response
Internal Server Error.
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,
-
In the Essbase files catalog, copy
LCM_Sample_Currency.zipfrom the gallery to your user directory or a shared directory. -
Run an Import LCM job to build the application and cubes. Sample.Interntl is the main cube, and Sample.Xchgrate is the currency cube.
-
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.
-
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"
}