Use Case: Import an already exported OIC integration using Oracle provided REST APIs.
Integration style: App Driven Orchestration
Connections used:
- Rest Trigger
- Rest OIC self Invoke connection
- FTP
Verb used: POST
REST API used:/ic/api/integration/v1/integrations/archive
For how to export an integration using REST API, follow my blog:
https://soalicious.blogspot.com/2022/05/oic-export-integration-using-rest-api.html
Oracle provided Rest api links:
We can get all the Rest APIs in docs.oracle.com site under integrations section.
https://docs.oracle.com/en/cloud/paas/integration-cloud/rest-api/index.html
Flow details:
- The Integration will take 2 request parameters Identifier and Version and 1 response parameter as Status.
- It will calll FTP adapter to poll the exported .iar file using the file name as concat(Identifier,"_",Version,".iar")
- It will then call the OIC REST self connection and use IMPORT REST API URI and choose multipart/form-data media type and map the ftp response .iar file reference to attachment reference to import the file to OIC instance.
- During import call mapping, we added the following:
- Read file response (file reference) >> Attachment Reference
- Content-Type: "multipart/form-data"
- File Input Html Field Name: "file"
Steps with POC Screenshots:
Rest Trigger config:
Already exported .iar file polling using FTP adapter
Call OIC Self REST adapter and configure to import integration
Now change the state from Configured to Active and check and configure all the imported connections, lookups etc.
Similarly, we not only can export and import integrations using REST apis, there are others functions like delete/clone/import replace/retreive errors/retrieve status/update integrations and same we can do for connections, lookups, Libraries etc.
No comments:
Post a Comment