Dayalan Punniyamoorthy Blog

Wednesday, December 29, 2021

Running Data Management rules using REST API (PBCS/EPBCS)

REST API allows running the Data Management rules using the following two job type methods

  • DATARULE
  • INTEGRATION
DATARULE - is an older method for running the Data Management whereas INTEGRATION is the updated version of DATARULE method.

In this blog let's see how to invoke a Data Management rule using the INTEGRATION method using Postman.


Integration Job Type

-------------------------------------------------------------------------------------------------------------------------
Straight from the Oracle document.

Use the INTEGRATION job type for the jobs REST API to execute an integration or data load rule based on how periods are processed and source filters.

The INTEGRATION job type is an enhanced version of DATARULE job type (see Running Data Rules). It is recommended that you use the INTEGRATION job type for future integration jobs.

The INTEGRATION jobtype supports running integrations/data load rules based on:

period names provided to Planning
Global POVs
Planning substitution variables
source filters selected as runtime parameters.
existing period ranges
It also supports overriding the source filters at runtime without modifying the integration definition.


Prerequisites:
You must have the required privileges to execute a specific data rule/integration.

REST Resource
/aif/rest/{api_version}/jobs

Method:
POST

Payload:
{
"jobType":"INTEGRATION",
"jobName":"EPMtoHFM_***",
"periodName":"{Dec-21}",
"importMode":"Replace",
"exportMode":"Merge",
"fileName":"inbox/AOPFullYearAllExcICSGA.txt"
}

-------------------------------------------------------------------------------------------------------------------------

Let's trigger the REST API from Postman. If you are new to Postman get that downloaded and use it from the link provided.


Specify the URL as below under URL and update the method to POST



https://YOUR EPM CLOUD URL.com/aif/rest/{api_version}/jobs

{api_version} is V1




Under Authorization specify your user name and password.


Under Payload specify the details as shown below,


Once you click the Send Buton it triggers the Data Management rule and will display the status as below,



If the status is -1 it has successfully triggered the rule and you can validate the same under Data Management Process Monitor.



The Job ID returned by Postman is 1171 and the same ID can be found under Process Details as 1171. Do note this is a Data Export rule hence you notice an option to download the data file exported. 

This is a cool handy tool you can leverage and will help you to automate using Groovy & REST API. We will take more on this topic in the coming blogs...stay tuned....



1 comment:

  1. I just want to say that all the information you have given here is awesome...great and nice blog thanks sharing..Thank you very much for this one.
    And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things.
    best certified financial advisers in nashik

    ReplyDelete