Showing posts with label OIC Factory API. Show all posts
Showing posts with label OIC Factory API. Show all posts

Monday, June 29, 2026

#1149 - Replay Instances using the OIC Factory API

Introduction

Here's a simple example of such. I have a sync integration that has been activated as follows - 

Note the Allow to run again option.

I ran the integration, then replayed it 3 times via Postman - 

Note the replay icon on the 3 instances.

Now to the Postman api call - 

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/instances/yourFlowInstanceId/replay?return=sync&integrationInstance=yourOICInstance


The request body is as follows - 

{"replayTraceLevel":"Debug",
"flowCode":"SYNC_1","flowVersion":"01.00.0000",
"projectCode":"AA_RESUBMIT_AGENT"}

 I execute the call from Postman and now see 5 instances -



Monday, June 22, 2026

#1148 - Resubmit errors via Factory API

Introduction

Many OIC customers resubmit errored flows via the factory api, this works, but sometimes a little more detail is helpful. Ergo this blog post. Let's start with a couple of errored async flows.

Resubmit Errors via Factory API

Here are my 2 errors -

I will resubmit via the factory api - first, let's check out the api docs -

The response description is as follows -

Here we see a 202 response code, which tells us that this api is, per default, async.

I try it out in postman - 


and get the following response -

Empty body and 202 response.

The instances have been resubmitted -

I now engineer a couple of more errors - 

I return to postman and change the add the following return parameter to the url -

https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/errors/resubmit?integrationInstance=myOICInstance&return=sync 

This will ensure I get a sync response.

The response has the following format.

{
    "acceptedIds": [
        "BhYp_G7OEfGJYpvwjtaODQ",
        "_qQwUm7NEfGj4tHFvE-1xw"
    ],
    "links": [
        {
          ...
    ],
    "recoveryJobId": "wT50027OEfG_or0gmGmhLg",
    "resubmitRequested": true,
    "resubmittedFailedInstances": [],
    "resubmittedInstancesCount": 2
}










 

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.
 

















Tuesday, December 17, 2024

#1051 - OIC Factory API for Project Export/Import

Introduction

This post details how to use the OIC Factory apis to export projects from one OIC instance, say Dev, and then import the aforementioned into another OIC instance, let's call it Test.

Basic Import/Export

Here is my project in the Dev Instance - 

3 integrations and 2 connections - 

I use the following api to export the project -

https://design.integration.myDC-1.ocp.oraclecloud.com/ic/api/integration/v1/projects/AA_PROJECT_API/archive?integrationInstance=myOICDevInstance 

I execute the request in Postman - 

Then I save the result to a file - 

I now import the project using the api -

https://design.integration.myDC.ocp.oraclecloud.com/ic/api/integration/v1/projects/archive?integrationInstance=myOICTestInstance

I check it out in my test OIC instance - 

The Fusion ERP connection is set to draft, as the connection details are not exported - 

I can use the following api to get the project connections - 

I can run this against the source instance, my Dev OI instance.

https://design.integration.myDC.ocp.oraclecloud.com/ic/api/integration/v1/projects/AA_PROJECT_API/connections?integrationInstance=myOICDevInstance



Next API call is to retrieve that particular connection, FUSION_ERP -


https://design.integration.myDC.ocp.oraclecloud.com/ic/api/integration/v1/projects/AA_PROJECT_API/connections/FUSION_ERP?integrationInstance=myOICDevInstance

I now need to update the connection, in the project on my OIC Test instance.

for example, I need to add the Fusion Apps url, user and password - 

Here is the api I will use for this - 

https://design.integration.myDC.ocp.oraclecloud.com/ic/api/integration/v1/projects/AA_PROJECT_API/connections/FUSION_ERP?integrationInstance=myOICTestInstance

Here is the payload - 

{  

      "connectionProperties": [

        {

            "displayName": "ERP Cloud Host",

            "hasAttachment": false,

            "hiddenFlag": false,

            "propertyDescription": "...",

            "propertyGroup": "CONNECTION_PROPS",

            "propertyName": "Host",

            "propertyShortDesc": "https://<customer_chosen_domain_name>.fa.<DC>.oraclecloud.com",

            "propertyType": "URL",

            "propertyValue": "https://myFusionERP-fa.oraclepdemos.com",

            "requiredFlag": true

        }

    ],

     "securityProperties": [

        {

            "displayName": "Username",

            "hasAttachment": false,

            "hiddenFlag": false,

            "propertyDescription": "A username credential",

            "propertyGroup": "CREDENTIALS",

            "propertyName": "username",

            "propertyShortDesc": "Use UserName",

            "propertyType": "STRING",

            "propertyValue": "casey.brown",

            "requiredFlag": true

        },

        {

            "displayName": "Password",

            "hasAttachment": false,

            "hiddenFlag": false,

            "propertyDescription": "A password credential",

            "propertyGroup": "CREDENTIALS",

            "propertyName": "password",

            "propertyShortDesc": "Enter Password",

            "propertyType": "PASSWORD",

            "propertyValue": "Welcome1",

            "requiredFlag": true

        }

    ]

}

The following header is also required -

Now the connection is configured - 

Final step is to activate the integrations - 

https://design.integration.myDC.ocp.oraclecloud.com/ic/api/integration/v1/projects/AA_PROJECT_API/integrations/SHIPORDER|01.00.0000?integrationInstance=myOICTestInstance

We also need the following header and body -  

The response - 

I validate in OIC - 

The integration activation REST API also supports a request parameter - enableAsyncActivationMode. This ensures the invoke does not wait for the activation to complete. 

Handling Project Updates

Now a change has been made to our project in the Dev instance - this needs to be pushed to Test.

I need to update my Test OIC instance accordingly. First step is to delete the project in the Test instance -

The request fails, as I have an activated integration, SHIPORDER, in my project. Here I use the update an integration in a project api, this time with status set to CONFIGURED.




I validate in my OIC Test instance -

Now I execute the project delete api again - 

Now I can start afresh, as detailed in the Basic Export/Import section above. 

Summa Summarum

Promoting OIC Projects form one instance to another is easy with the OIC Factory api. The full Factory api doc are here.