Thursday, December 18, 2025

#1110 - Moving Integrations to Projects via Factory API

Introduction


Projects are a key feature in OIC3 and you need to start using them, in order to take advantage of all the cool new features we have.

Today you can copy your integrations from the "global space" into projects - Here's a simple example - 

 
I use the copy integration option -

As you can see, I have 3 integrations in the global space. In this case, I want to copy both ERP integrations into this projects, but as you can see, there is no multiple select option here, so I need to do this one at a time.


Now I will look at implementing a more complete solution, using the factory api.

In my simple use case, I want to move all integrations prefixed with ERP_ to my ERP Project,  AA_MY_ERP_PROJECT.

First step is to retrieve the ERP integrations - here's the api call -
https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations?q={name: /ERP_/}&integrationInstance=myOICInstance

The response is as follows -

{
    "hasMore": false,
    "items": [
        {
            "code": "ERP_CREATEORDER",
            "compatible": true,
        ...
    "id": "ERP_CREATEORDER|01.00.0000",
        ...
    "percentageComplete": 100,
            "projectType": "DEVELOPED",
        ...
    "status": "CONFIGURED",
       ...
        {
            "code": "ERP_GETORDER",
          ...
    "totalResults": 2
}

The following api call copies the integration to a project -

POST - https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/myProject/integrations/copy?integrationInstance=myOICInstance

Note the request payload - 

{"projectCode":null,"integrations":[{"code":"ERP_GETORDER","version":"01.00.0000"}]}

I check my new project - 

ERP_GETORDER is still present in the global space. 
In the meantime, I've activated the ERP_CreateOrder integration.

This will set the status accordingly. 

  "status": "ACTIVATED",


I copy this integration to the project - 

Excellent! My ERP integrations are in my ERP Project. But wait a minute, they're still in the global space. I need to delete them form there, this is, after all, a move.

Activated integrations cannot be deleted, so I need to check the status field, shown above. 

If status = ACTIVATED then I need to deactivate -

For this I use the following api -

Here I need the id field from the GET Integrations response.

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/ERP_CREATEORDER|01.00.0000?integrationInstance=myOICInstance

Now to deletion, here I use - 

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations/ERP_CREATEORDER|01.00.0000?integrationInstance=myOICInstance






ERP_CREATEORDER Integration is deleted - 

Finally, let's build a UI around this; starting point is the following OIC Project -


These 3 integrations encapsulate the api calls we've already discussed.

Get Integrations: retrieves a list of integrations, based on a filter - 

 

I invoke this from a simple VB app - 

This page includes a table, I activate multiselect on its rows - 
The table gets its data from the following service connection endpoint -

Back to OIC, the next integration we'll look at is Move Integrations. This integration does the following - For the integrations list received, iterate over each integration, invoking the 3rd integration, Copy Integration, which copies the integration to the target project specified in the VB app. It then checks whether the integration status = ACTIVATED; if this is the case, the integration is deactivated. Finally, the integration is deleted from the global space.

I will now show you how to add the endpoint of Move Integrations to the VB Service Connection.

That's it - simple stuff!

Summa Summarum

The OIC UI will soon support the ability to do multi-selects on a list of integrations and then move them to a project. You can consider using the option described in this post, until the OIC UI supports such.
 

















No comments: