Friday, October 18, 2019

OIC: REST APIs Examples for managing Integrations

Expanding upon the last article I'm providing additional details and examples for using Oracle Integration Cloud REST APIs for managing your integrations. 

Note that for the examples below I will be using one of the pre-packaged integration named Hello World (version 1.2.000)

To limit the size of this posting I'm just providing examples only and limiting to common use-cases (small subset of the options). For additional details and completeness pls refer the official doc - REST API documentation


To get list of Integrations

curl -u username@email.password  -v -H "Content-Type:application/json" -H "Accept:application/json" -X GET https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/integrations


Export one integration 

 curl -u username@email.password -X GET  -H "Content-Type:application/json" -o ./HELLO_WORLD_01.02.0000.iar_BAK https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/integrations/HELLO_WORLD%7C01.02.0000/archive 


Friday, October 11, 2019

OIC: List of Integrations by Creator

Oracle Integration Cloud provides rich set of REST APIs to manage your connections/integration and life-cycle events. See details here for complete set.

There the APIs to get list of integration in JSON format but at this point there is no out of box API support for filtering out the results by creator or author of the artifact. One can use common programming language to parse the filter out the results but that require additional effort.

In this blog, I will provide simple command line means of achieving that. We will use curl and one command line library to parse JSON data - https://stedolan.github.io/jq/ 

The following was developed and tested on Mac OS (Mojave 10.14.6 ) and OIC version 19.3.1.0.0 (190624.1100.29533)

Install jq
brew install jq

Get list of integrations

Replace the highlighted (in blue) for your environment...

curl -u username@email.com:password -H "Content-Type:application/json" -H "Accept:application/json" -X GET https://instance-name.integration.ocp.oraclecloud.com/ic/api/integration/v1/integrations | jq '. |  {code: [.items[].code]}'


Understanding JavaScript Prototypal Inheritance for Java developers

Inheritance is a fundamental concept in programming languages. However, it is implemented differently in Object-Oriented Languages such as J...