Set Currency Settings
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/currencySettings
Updates the currency settings for the database.
Request
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
Currency settings.
object
-
categoryMemberName:
string
For currency databases, the accounts dimension where currency categories are defined.
-
conversionType:
string
Allowed Values:
[ "division", "multiplication" ]
-
conversionTypeMemberName:
string
In a currency cube, the optional currency type dimension that enables different scenarios for currency conversion. Typically, a cube has different exchange rates for different scenarios, such as actual, budget, and forecast. To convert data between scenarios, you select which type of rate to use.
-
countryMemberName:
string
For currency databases, the country dimension.
-
currencyDatabase:
string
The currency cube. By assigning currency tags to members in the main cube outline, you enable Essbase to generate the currency cube automatically. In the Sample_Currency application, the currency cube is Xchgrate.
-
partitionMemberName:
string
Optional. The name of dimension designated as the currency partition. This dimension contains members for both local and base values, and holds the data that users input in their own currencies. The local data is converted to the base data using currency conversion calculation scripts.
-
timeMemberName:
string
For currency databases, the time dimension.
Response
- application/json
- application/xml
200 Response
OK
Currency settings updated successfully.
string
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.zip
from 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"
}