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! 












Wednesday, May 15, 2024

#1015 OCI Health Check for OIC

 














According to the official docs - 

The Oracle Cloud Infrastructure Health Checks service provides users with high frequency external monitoring to determine the availability and performance of any publicly facing service, including hosted websites, API endpoints, or externally facing load balancers. By using Health Checks, users can ensure that they are immediately aware of any availability issue affecting their customers.

In our case, think of this as pinging OIC.

I need something to ping - I choose to do a GET on the /metadata url for a simple app driven integration.

Mine is called AA-BY-CheckStatus. BY for Bayern.  

I checkout the metadata -

and take the Open API Url, deleting the final /openapi

Leaving us with - 
https://yourOICInstance/ic/api/integration/v1/flows/rest/yourIntegration/1.0/metadata

Create the Health Check with these values - 


 




Then wait a while, before checking out the history and metrics - 


Now to OCI Logging and the OCI Dashboards. Create a new dashboard, based on the Health Check we just created. Configure as follows - 




I then added another OIC instance, this time my Gen2 instance, for which I have also created a health check. I waited a bit and then stopped the gen2 instance - 


 I then re-started the gen2 instance, but before looking at the dashboard, let's check out what other metrics are available from the OCI Health Check.


 Final view of the dashboard -