Skip to main content

Connecting EPM Cloud Planning to Apex with Rest API: Running Jobs in Planning from Apex Part 1 of 2


I've already run through how to view and change your substitution variables in Oracle Planning via Apex, so let's take a look at something a bit more versatile, running jobs in Oracle Planning from Apex. According to Oracle's documentation you should be able to run any of these types of jobs using Rest API:

Plan Type Map
Import Data
Export Data
Export Metadata
Import Metadata
Cube Refresh
Clear Cube
Administration Mode
Compact Cube
Restructure Cube
Merge Data Slices
Optimize Aggregation
Import Security
Export Security
Export Audit
Export Job Console
Sort Members
Import Exchange Rates

I haven't had a chance to test them all and see how they work/ if they require any further tweaking, but the one's that have worked have done so with relative ease which makes me feel fairly confident in writing this that you shouldn't run into any issues, but please do let me know if anything does fail to work for you so I can try and find a workaround for you.

Our Objective:

For now I will be outlining how to create a table that lists all the available jobs you can run, which also provides you with the ability to run those jobs straight from Apex.

Lets Begin:

We start off much in the same way as in previous blogs, in the "Shared Components" area of the application you want to run the jobs from.

Then to "Web Source Modules" within the "Data Sources" tab.

From here we click "Create", then select the "From Scratch" option.

You will need to repeat these steps even if you have made the other Web Source Modules from my other blog posts, as this one uses a different service URL Path

Once here we select "Simple HTTP", name the module anything of your choice; I've named mine "Planning_Job_Definitions", and insert the URL Endpoint, this is the REST API URL for the environment you wish to access, you can copy mine shown below and simply insert the applicable ID Domain and data centre for you, but all we're essentially doing here is appending the normal Planning URL with "HyperionPlanning/rest/" (Remove reference to "test" if required).

Then in the next screen you need to insert your "Service URL Path", this is essentially choosing how you wish to interact with planning, which application you're specifically targeting, and the latest version of the API, which is currently V3.

All you need to do here is take the same Service URL Path as mine, but replace APPNAME with the name of your application.

Then you need to add in your user credentials, this will save your credentials, so if you already have a link with Planning setup you can select those credentials from the drop down list (this also makes maintenance easier if the credentials change), otherwise select "Enter new credentials" and authentication type "Basic Authentication".

Your username will be a combination of your ID Domain and Username as shown above (IDDomain.Username), and your password which will be unchanged.

Once you hit "Discover" you should reach the "Web Source Discovery" panel which will preview the available jobs from your chosen application.

The issue here is that the service URL needed to run a job is different to the service URL needed to list the jobs you can run.

So you will now need to repeat the process for another "Web Source Module", this time using an alternative "Service URL Path" as shown below, all else staying the same, I named this new module "Planning_Run_Job".

If you click "Discover" you will hit the following error screen, this is due to the fact the module automatically creates a GET request for the module you create when you try and discover, and this Service URL doesn't have GET functionality, only POST.

To get around this you will need to click "Create Module Manually", this will create the module without trying to perform a GET request.

Then unlike the last web source we will need to edit the operation attached to this one by clicking on it in the web source module list and heading to the "Operations" tab.

Here we will need to change the existing GET operation to a POST in the "HTTP Method" area, as well as fill in the below extra details. As mentioned in earlier blogs the body template information can be found on the Oracle Rest API Reference Guide which may help you perform other Rest calls to Oracle Planning going forward.

Once complete, click "Apply Changes", and we're ready to move on to part 2. This concludes part 1 as we have now created the Web Source module we will reference in our application, in part 2 I will explain how to use these two modules to list and then run jobs in Planning from Apex.

Thank you for Reading.

You can read many other useful Oracle EPM Cloud and Netsuite ERP blogs posted by my colleagues at Brovanture here



Popular posts from this blog

Oracle Apex Basics: Conditional Formatting

Our Objective: Here I will be outlining how to apply conditional formatting to your grids and reports in oracle apex, for instance shading highly positive figures as green or negative figures as red. This can be especially helpful when creating end user reports. Lets Begin: First you will need the report you're applying the formatting to, to have an SQL query as it's source. Once you have the query you want, we need to add an additional "Conditional_Formatting" column, and for that column to be populated with 'Green' should a certain column's data meet a criteria. Here I have made the 'Conditional_Formatting' column populate with 'Green' when the figure in the 'Likes' column is greater than or equal to 2. This will have added an extra column to our report, one which you will probably want to hide from view as it is only used in deciding the color of the conditional formatting.  From here we need to write t

Connecting EPM Cloud Planning to Apex with Rest API: GET Substitution Variables

Intro: Oracle Apex and Oracle Planning should be a match made in heaven, both are cloud based and full of API possibilities. You can even get a free trial of Apex  here to see if these sort of features would prove useful for you, or your organisation. Our Objective: Here I will be outlining how to create a table in Oracle Apex that dynamically pulls through the substitution variables from a Planning application, In a follow-up blog post I will try and outline how to then push changes made to the substitution variables in Apex back into Planning. Let's Begin: We start off this process in the “Shared Components” area of the application you want to add the substitution variables table to . Then to “Web Source Modules” within the “Data Sources” tab. From here we click “Create” , then select the “From Scratch” option. Then here we select “Simple HTTP” , name the module anything of your choice; I’ve named mine “Planning_Substitution_Variables

Oracle Apex Basics: Locking access by IP Address

Intro: This series of posts is focused on providing guides for smaller, more specific parts of Oracle Apex, to help users incorporate these features easily into their own applications. I'll be focusing on features that I myself struggled to find reference to when initially starting to use apex, so hopefully these posts help others in search of the same functionality.  Our Objective: Here I will be outlining how you lock access to an application by it's IP address, particularly useful when trying to match the security settings of your other platforms. For instance there's no point in locking Oracle Planning's access by IP whilst keeping metadata from it stored in an Apex application that isn't. Lets Begin: First within our Oracle Cloud console simply head to "Autonomous Data Warehouse" then click on the ADW you wish to IP lock. Then within that go to "More Actions" and select "Access Control List". From