REST, Groovy and EPM Automate

A client recently asked me to write some automation for PBCS so I’ve spent the last few days looking at the REST API, Groovy and EPM Automate trying to understand what I need to know and more importantly what I need to use. I found it difficult working out what each ‘product’ was and what I needed to use so here is a brief and simple overview.

REST API

REST API is a type of API not a programming language. It is the mechanism that provides the ability to automate the processes in Oracle’s cloud-based products. If you want to automatically load data into PBCS, you use the REST API. If you want to import maps into FDMEE for PBCS you use the REST API.

You will probably never use the REST API directly because EPM Automate is easier. If you do use the REST API, you will need to understand JSON.

EPM Automate

EPM Automate is a wrapper around the REST API. This means that there is a simple way of calling the REST API. If you want to automatically load data into PBCS, EPM Automate has a function that you can use. It is simple to use and is quite well documented. This should be the first thing you look at if you want to automate processes in the cloud.

EPM Automate does not have all the functionality of the REST API and that’s why you might need Groovy.

Groovy

If you are trying to automate a cloud process and the function you want is not in EPM Automate, then you need to use something like Groovy. Groovy is a programming language for the Java virtual machine and gives you the ability to execute the complete REST API. As an example, EPM Automate has the importdata command for loading data into PBCS and it needs a job name. EPM Automate does not have the function to get the list of current job definitions so if you want to check that the job exists before executing the importdata command, you need to use another method of accessing the REST API.

You don’t have to use Groovy; you could use many other things such as Powershell or Jython. The vast majority of clients who use Oracle’s cloud-based products will not need Groovy (or the alternatives) because EPM Automate provides everything they need.

JSON

REST API is a form of web services and you need to use some hypertext transfer method to send and receive data. A common way of doing this is XML files. JSON is similar to XML in that it sends and returns data in a structured manner. The REST API guide documents the format of the JSON structure for each of the API calls.

JSON is only relevant for Groovy and Jython because it is contained in a jar file (java-json.jar). If you are using EPM Automate, you don’t need JSON. If you are using Powershell you don’t need JSON because it has its own methods for send and receiving REST data.

 

More information

REST API

The documentation for the REST API is in this document. The link might change.

REST API for Oracle Enterprise Performance Management Cloud E71243-06

Click to access PREST.pdf

 

John’s blog has a great introduction to the REST API:

http://john-goodwin.blogspot.co.uk/2015/09/planning-rest-api.html

EPM Automate

The documentation for EPM Automate is in this document. The link might change.

Working with EPM Automate for Oracle Enterprise Performance Management Cloud E71316-08

Click to access CEPMA.pdf

Groovy

Jake’s blog has a superb introduction to using Groovy with the REST API.

http://turrellconsulting.com/blog/?p=733

Integration Guide

There’s also a general integration guide.

Oracle Cloud Enterprise Performance Management Integration Guide E76406-03.

Click to access INTGR.pdf