Oracle Cloud Infrastructure Data Integration is a fully managed, multi-tenant, serverless, native cloud service that helps you with common extract, load, and transform (ETL) tasks such as ingesting data from different sources, cleansing, transforming, and reshaping that data, and then efficiently loading it to target systems on Oracle Cloud Infrastructure. Based on the previous blogs, we now understand how Oracle Cloud Infrastructure Data Integration can be used for doing seamless ETL activity using a graphical interface. This blog will walk through how to use the Application Programming Interface (API) and Command Line Interface (CLI) with Oracle Cloud Infrastructure Data Integration. This is very useful for use cases such as triggering Data Integrations tasks via events for example.

In order to use any of the CLI or REST APIs, Oracle Cloud Infrastructure Data Integration has a few pre-requisites:

  1. Only an IAM User can invoke the API. So make sure the users are created.

  2. Generate an RSA key pair and its fingerprint, as mentioned in https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#How3
    Example of the Fingerprint – 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef

  3. Another way to access Oracle Cloud Infrastructure Data Integration is to use a resource principal – for example, if you call the APIs from an Fn function.
  4. Make note of your OCI tenancy’s OCID and the specific user’s ( created in #1 above) OCID, as described in https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#Other

  5. Upload the generated RSA public key from the key pair, as described in – https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#three

  6. Generate the required header and authentication bits and invoke the API. For API, the authentication needs to be constructed manually.

For understanding the configuration of API with Postman and CURL, refer below A-Team blogs –

Using the REST APIs

In this example, I will be using Postman for calling the Oracle Cloud Infrastructure Data Integration Tasks in the Application. To understand more about Tasks and Applications, refer to Tasks

The Integration Task is created and published in the Application. Copy the Task key which will be required to pass in the Postman body.

Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-3_14-47-26.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-7-3_14-47-26.png?version=1&modificationDate=1593767858613&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image1-13.png” style=”width: 600px; height: 250px; border-width: 1px; border-style: solid;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-3_14-47-26.png”>

In the Postman, after importing collections based on the A-team blogs, you need to specify the following:

Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-6_18-46-28.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-7-6_18-46-28.png?version=1&modificationDate=1594041389359&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image2-12.png” style=”width: 600px; height: 250px; border-width: 1px; border-style: solid;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-6_18-46-28.png”>

After specifying the variables i.e. tenancyId, authUserid, keyFingerprint, and privateKey create new requests in Postman under Collections. Since in this example I want to use POST for the execution of the task so will be using the following URL – https://dataintegration.<<region-name>>.oci.oraclecloud.com/20200430/workspaces/<<workspace-id>>/applications/<<application-id>>/taskRuns

Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-6_18-37-35.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-7-6_18-37-35.png?version=1&modificationDate=1594040856990&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image3-12.png” style=”width: 600px; height: 450px;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-6_18-37-35.png”>

Once all the configurations are done and when clicked on “send”, post of the request is successful and you can see the Task is executed successfully in the UI.

Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-6_18-42-17.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-7-6_18-42-17.png?version=1&modificationDate=1594041137493&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image4-12.png” style=”width: 600px; height: 150px; border-width: 1px; border-style: solid;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-7-6_18-42-17.png”>

Instead of Postman, “oci-curl” can also be used. To understand more about “oci-curl” and configuration, refer to – https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatinglocalocicurl.htm

Using the Oracle Cloud Infrastructure CLI

CLI is a command-line interface that accepts text input to complete Oracle Cloud Infrastructure tasks. To configure Oracle Cloud Infrastructure CLI, refer to – https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm

After installation of Oracle Cloud Infrastructure CLI, the following are the variables that need to be initialized in ~/.oci/config file

  • Profile – Name of the profile, in the screenshot it is provided as <<DEFAULT>>
  • user=<<User_OCID>>
  • fingerprint=<<API Key of the OCI user>>
  • tenancy=<<Tenancy_OCID>>
  • region=<<region_name>>

Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-8-13_9-28-29.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-8-13_9-28-29.png?version=1&modificationDate=1597291110938&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image5-11.png” style=”width: 600px; height: 100px; border-width: 1px; border-style: solid;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-8-13_9-28-29.png”>

After the installation of Oracle Cloud Infrastructure CLI and Initialization, you can run the commands accordingly. In this example, I will be viewing the list of Workspaces and Task runs along with that will be creating an Object Storage Data Asset in the Workspace using CLI.

Go to the directory where Oracle Cloud Infrastructure CLI is installed and under bin directory execute the commands accordingly. After execution, the output is always in JSON format.

  • To list all the Workspace for Oracle Cloud Infrastructure Data Integration –
    • oci data-integration workspace list –compartment-id <<Compartment_OCID>>
      Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-8-13_14-24-22.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-8-13_14-24-22.png?version=1&modificationDate=1597308875752&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image6-11.png” style=”width: 600px; height: 175px; border-width: 1px; border-style: solid;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-8-13_14-24-22.png”>
       
  • To list all the Task runs in the Application for Oracle Cloud Infrastructure Data Integration –
    • oci data-integration task-run list –workspace-id <<Workspace_OCID>> –application-key <<Application_Key>>
    • Application key can be found in the URL of the Application within the Oracle Cloud Infrastructure Data Integration Workspace:
      https://console.<<region>>.oraclecloud.com/dis/<<Workspace_OCID>>/applicationDetail/<<Application_Key>>
      Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-8-13_14-31-39.png” data-mce-src=”https://confluence.oci.oraclecorp.com/download/attachments/266570807/image2020-8-13_14-31-39.png?version=1&modificationDate=1597309335063&api=v2″ data-unresolved-comment-count=”0″ src=”/wp-content/uploads/sites/121/2025/11/image7-10.png” style=”width: 600px; height: 400px; border-width: 1px; border-style: solid;” title=”Data Integration Service > Introduction to CLI, API for Oracle Cloud Infrastructure (OCI) Data Integration > image2020-8-13_14-31-39.png”>
       
  • Similarly to create Data Asset following command can be used –
    • oci data-integration data-asset create –workspace-id <<Workspace_OCID>> –from-json file:///tmp/da_os.json
      Then /tmp/da_os.json can have:
      {
        “name”:”testda”,
        “modelType”:”ORACLE_OBJECT_STORAGE_DATA_ASSET”,
        “identifier”:”TESTDA”,
        “defaultConnection”:
      {     “name”:”Default Connection”,     “modelType”:”ORACLE_OBJECT_STORAGE_CONNECTION”,     “identifier”:”DEFAULT_CONNECTION”   }
      ,
        “url”:”https://objectstorage.<<Object Storage region>>.oraclecloud.com“,
        “tenancyId”:”<<Tenancy_OCID>>”,
        “namespace”:”PUTYOURNAMESPACEHERE”
      }

       
  • Instead of using “oci-curl”, we can take advantage of CLI. The OCI CLI also supports a raw-request parameter. This has the benefit that it will use .oci/config for credentials and you don’t have to edit the “oci-curl” shell script to add authentication. Few examples using OCI CLI and raw-request
    • Using GET request – Used to list Workspaces in the Compartment
      oci raw-request –http-method GET
      –target-uri https://dataintegration.us-ashburn-1.oci.oraclecloud.com/20200430/workspaces?compartmentId=<Compartment-ID>>

    • Using POST – To create project withing Workspace
      oci raw-request –http-method POST –target-uri https://dataintegration.us-ashburn-1.oci.oraclecloud.com/20200430/workspace/<<Workspace-ID>>/projects –request-body ‘{“name”:”<<Project-Name”, “identifier”:”<<Project-Identifier>>”}’

You can see some interesting use cases for event based integration in David Allan’s blog post here which triggers tasks via the OCI Event Service – so for example when an object arrives in Object Storage an OCI Data Integration task can be triggered to load data into an Autonomous Data Warehouse.

This concludes an overview of using API and CLI with Oracle Cloud Infrastructure Data Integration. For using the SDK, David has written exploratory blogs that can be found – Get Going with Oracle Cloud Infrastructure Data Integration.

Have you seen some of our other blogs?  Check out all the blogs related to Oracle Cloud Infrastructure Data Integration. To learn more, check out some Oracle Cloud Infrastructure Data Integration Tutorials and Documentation.