Enter your keyword

post

Oracle Integration Cloud REST API to get the Integration Statistics

Oracle Integration cloud provides a rich monitoring dashboard to see the Integration statistics. But there is a limitation that statistics can’t be downloaded from the dashboard in any format (XLS, pdf etc.). To overcome this limitation Oracle Integration Cloud provides RESTFul APIs which provides the statistics of each and every running integration.

In this article, we’ll demonstrate how to use Integration Cloud REST API to retrieve monitoring integrations as well as how to generate excel sheet using java code.
Below is the REST API details which is used to retrieve monitoring integrations:
URL:

For ICS:
/icsapis/v2/monitoring/integrations
For OIC / AIC
/ic/api/integration/v1/monitoring/integrations
HTTP Verb: GET
Authentication

Basic Authentication is required
Query Parameter

Parameter Name
Optional
Filter Parameters
q
Yes
timewindow: “1h”,”6h”,”1d”,”2d”,”3d”,”RETENTIONPERIOD” For examples: {timewindow: ‘3d’}
Response:
{
    “items”: [
        {
            “code”: “TEST_API”,
            “id”: “TESTP_API|01.00.0000”,
            “links”: [
                {
                    “href”: “https://testinstance.integration.us2.oraclecloud.com:443/icsapis/v2/monitoring/integrations/TEST_API%7C01.00.0000”,
                    “rel”: “self”
                },
                {
                    “href”: “https://testinstance.integration.us2.oraclecloud.com:443/icsapis/v2/monitoring/integrations/TEST_API%7C01.00.0000”,
                    “rel”: “canonical”
                },
                {
                    “href”: “https://testinstance.integration.us2.oraclecloud.com:443/icsapis/v2/integrations/TEST_API%7C01.00.0000”,
                    “rel”: “integration”
                }
            ],
            “name”: “TEST_API”,
            “noOfErrors”: 0,
            “noOfMsgsProcessed”: 1,
            “noOfMsgsReceived”: 1,
            “noOfSuccess”: 1,
            “successRate”: 100,
            “version”: “01.00.0000”
        },
        {
            “code”: “PRO_CREATION”,
            “id”: “PRO_CREATION|04.00.0000”,
            “links”: [
                {
                    “href”: “https://testinstance.integration.us2.oraclecloud.com:443/icsapis/v2/monitoring/integrations/PRO_CREATION%7C04.00.0000”,
                    “rel”: “self”
                },
                {
                    “href”: “https://testinstance.integration.us2.oraclecloud.com:443/icsapis/v2/monitoring/integrations/PRO_CREATION%7C04.00.0000”,
                    “rel”: “canonical”
                },
                {
                    “href”: “https://testinstance.integration.us2.oraclecloud.com:443/icsapis/v2/integrations/PRO_CREATION%7C04.00.0000”,
                    “rel”: “integration”
                }
            ],
            “name”: “PRO_Creation”,
            “noOfErrors”: 2,
            “noOfMsgsProcessed”: 35,
            “noOfMsgsReceived”: 35,
            “noOfSuccess”: 33,
            “successRate”: 94,
            “version”: “04.00.0000”
        }
    ]
}
Below is the screenshot of POSTMAN where we executed the REST APIs to get data with and without query parameter. If the query parameter will not be passed then the data will come from the first day.

This is how the REST API can be used to get the monitoring instance. Let’s come on how to generate excel sheet based on the data received from API using java code.

Below is the snapshot of the Excel sheet which will be generated using JAVA code

Below is the structure of JAVA code developed in JDeveloper

Download the JAVA code which is used to generate an Excel sheet. Import the code into JDeveloper, update the Constants.java file and run CreateReport.java file directly. An excel file will be generated in the configured folder.

One Comment

  1. added on 28 Feb, 2019
    Reply

    Hey Ankur,
    I am trying to establish integration between a SaaS Product and on-Premise peoplesoft product. The SaaS product offer REST API and Peoplesoft Offers SOAP… So far the connection works…
    I am kind of stuck on the integration flow piece… my trigger should be the Saas Application. when I drop the connection as trigger and drop another Peoplesoft connection to Invoke, I do not get the proper mapping area…. The response of the Saas Application should be the Input for PeopleSoft application… did I miss anything.. much appriciate.

Leave a Reply

Your email address will not be published.