Friday, May 24, 2024

#1016 OIC3 Factory API - Design and Runtime URLs

The OIC3 Factory API docs are available here. When you check out the example requests, you will see the following -

The designtime url of OIC is used, as you can see. It has the format - 

https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/integrations?integrationInstance=service-instance


Many OIC Gen2 customers may be leveraging the Factory api today, e.g. for CI/CD etc. They are using the runtime url.

So let's try this out in Postman - 

Firstly, here is a request to retrieve integrations using the designtime url -


This is a GET https://design.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations?integrationInstance=myOICserviceInstance

 

I now try the runtime equivalent - 

https://myOICserviceInstance-px.integration.us-phoenix-1.ocp.oraclecloud.com/ic/api/integration/v1/integrations

The error - {
    "code": "NotAuthenticated",
    "message": "The required information
to complete authentication was not
provided or was incorrect."
}

I check out the Postman console - the request has been re-directed to the designtime url, however, the auth token has not been forwarded, hence the error. Looks like most HTTP clients (by default) strip out authorization headers when following a redirect, for security reasons. 

Next step is to click on the Settings for this request, then activate Follow Authorization Header. I then re-submit the request and it works! 












No comments: