Struggling with limited integration options with your Oracle EPM Cloud products? Well, REST API is what you are looking for! REST API stands for Representational State Transfer. Within Oracle EPM Cloud products, there is a utility called EPM Automate. EPM Automate is a batch utility that allows you to connect to your environment and perform various administrator tasks like execute business rules, load data, import/export metadata, and other planning functionality. EPM Automate is built on top of REST API commands. REST API is a direct connection from the client to the server over HTTP. And, you can utilize the REST API without understanding the full structure of the API.
In REST API, there are four methods that you will call use when you want perform an action to the server.
These are the methods you will be using when you write you REST API scripts. REST API can be coded in any type of programming language, as most of the popular languages have methods for consuming REST API. That being said, Oracle does have several documentations about coding REST API in Groovy. Groovy is a popular language within Oracle EPM Cloud products, including Planning and Budgeting Cloud Service (PBCS) and Enterprise Planning and Budgeting Cloud Service (EPBCS). You can now write Groovy scripts within calculation manager.
Within PBCS/EPBCS, the REST APIs are broken down into three types. The three types are Planning APIs, Migration APIs, and Data Management APIs. Each of these REST APIs have their own list of actions and tasks that can be executed.
Planning APIs: Planning APIs include most of the commonly performed tasks within Planning. For example, import/export metadata is a common administrator task that administrators need to perform on a monthly or daily basis. Running business rules and refreshing a database is also within the Planning APIs. One unique feature in Planning APIs is that you can add members dynamically in your REST API code. This is something that EPM Automate cannot perform.
Migration APIs: Migration APIs deal with your application snapshot where you can upload or download application snapshots. These actions are mainly used for download and upload files and import and export of your application snapshot.
Data Management APIs: Data Management APIs involve all tasks associated with data management. The command includes executing load rules, importing/exporting data mappings, and executing batch rules. This data management API will allow you to include your data load process in your REST API scripts.
How do you use REST API in your code? First, to call a REST API command you need to define the URL of your desired command. Here is a list of the REST API phases and version numbers you need to include in your URL when you call out these commands. These REST API phases and version numbers differ with the types of REST API you are using. Therefore, a REST API URL would be your PBCS/EPBCS application URL, plus the REST API phase and the version number.
Below are some examples of REST API code in Powershell.
This script is adding a new member in the account dimension. The member name is “New Member” under the parent “Unmapped_Accounts”. As you can see, the REST API URL is the application URL plus the Planning API phase and the version number then the application name and the phase for adding members in the account dimension. Finally, you will need to call out all the parameters to execute this REST API command using Invoke-RestMethod.
This script is executing a data load rule using the Data Management API. In the body, we are defining all the parameters that are needed to execute a data load rule. Once you have the body, define the REST API URL, which is the application URL plus the Planning API phase and the version number. Then, call out all the parameters needed to execute this REST API command using Invoke-RestMethod.
These are sample scripts you can write using REST API. You can do a lot more with writing custom REST API scripts to do integration with other systems like Business Intelligence Cloud Service (BICS). There are limitless opportunities where you can create functionality that meet your requirements using REST API. You can also incorporate REST API into other system API’s and enjoy a seamless integration process.
Blog post by Steven Wang of Key Performance Ideas.