Wednesday, April 17, 2019

#699 Creating/changing Integration Artifacts via the OIC REST API

You can leverage the OIC REST API to manage some of your integration artifacts, such as lookups, connections etc.

Let's see how easy it is to do so.

Create a Lookup











Thanks to my colleague Hermanth L.

Firstly to lookups - from the docs -

Use lookups in your integrations to create reusable tables that map the different terms used to describe the same item across your applications. A lookup associates values used by one application for a specific item to the values used by other applications for the same item. For example, one application uses a specific set of codes to describe countries, while another application uses a different set of codes to describe the same countries.

Essentially something like - CountryLookup








So now to the REST call - /ic/api/integration/v1/lookups
It is documented here

Request payload is of the format -
{"columns":["COL_NAME1","COL_NAME2"],"name": "LOOKUP_NAME","rows":[{"rowData":["COL1VAL1","COL2VAL1"]},{"rowData":["COL1VAL2","COL2VAL2"]}]}

columns  - refers to the different apps I need to consider - e.g. App1 and App2.
name - the name of the lookup e.g. CountryLookup
rows/rowData - the actual data e.g. IE/Ireland

Ok, let's try this in Postman -







Validate in OIC -


















Retrieve/Update a Connection









As you can see, my connection test failed - due to the following -

  • CASDK-0004 : Failed to authenticate against the application with the credentials provided
  • Access Denied

This is because my Service Cloud password changes regularly.

So what can we do via the API?

Retrieve/ic/api/integration/v1/connections/{id}

The id value is -













Try in Postman -
























Update - using the result from the GET, specify just the attributes you want to change.
















No comments: