Oracle Integration Cloud

Oracle Integration Cloud REST API Integration: Step-by-Step Guide

Pinterest LinkedIn Tumblr

Oracle Integration Cloud (OIC) is widely used by enterprises to connect cloud applications, on-premises systems, databases, and third-party applications. One of the most common integration patterns in OIC is REST API integration, which allows applications to exchange data through lightweight HTTP-based services.

For Oracle Fusion Cloud implementations, third-party applications, mobile applications, and custom business systems, REST APIs provide a flexible way to expose and consume business data.

In this guide, we will explain how to create a REST API integration in Oracle Integration Cloud, from creating the connection to testing and monitoring the integration.

What Is REST API Integration in OIC?

REST, or Representational State Transfer, is an architectural approach for building web services that communicate over HTTP.

A REST API typically uses HTTP methods such as:

  • GET – Retrieve data
  • POST – Create data
  • PUT – Update or replace data
  • PATCH – Partially update data
  • DELETE – Delete data

OIC provides a REST Adapter that enables developers to expose REST endpoints and invoke external REST APIs.

For example, an OIC integration could receive customer information through a REST API and then send that information to Oracle Fusion, Salesforce, a database, or another enterprise application.

Step 1: Create a REST Connection in OIC

The first step is to create a REST connection.

Log in to your Oracle Integration Cloud instance and navigate to the Design area. Open Connections and select the option to create a new connection.

Search for and select the REST Adapter.

Provide the required connection information, including the appropriate security configuration.

Depending on the API, authentication may use mechanisms such as:

  • Basic Authentication
  • OAuth
  • API Key
  • Other supported security policies

The authentication method should match the requirements of the REST API you are connecting to.

After entering the required information, test the connection before using it in an integration.

Step 2: Create a New Integration

After creating the REST connection, go to the Integrations section and create a new integration.

For an API-based integration, you can select an Application or app-driven integration pattern where the integration is triggered by an external request.

Give the integration a meaningful name and identifier.

For example:

Integration Name: Customer REST API Integration

Identifier: CUSTOMER_REST_API

A clear naming convention becomes particularly useful when an OIC environment contains dozens or hundreds of integrations.

Step 3: Configure the REST Trigger

Drag the REST Adapter onto the trigger section of the integration.

Select the REST connection created earlier.

OIC will ask you to define the REST API configuration.

You can configure elements such as:

  • Relative resource URI
  • HTTP method
  • Request payload
  • Response payload
  • Query parameters
  • Path parameters

For example, you could create an endpoint such as:

/customers

and configure it to accept a POST request.

The endpoint could receive a JSON request containing customer information.

Step 4: Define the Request Payload

The request payload describes the information that the REST API expects.

For example:

{
  "customerName": "ABC Technologies",
  "email": "contact@example.com",
  "country": "India"
}

When configuring the REST trigger, OIC allows you to define the request structure.

You can use an existing schema, sample JSON, XML schema, or other supported structure depending on the integration requirements.

A clearly defined request structure makes mapping and testing easier.

Step 5: Add the REST Invoke

After configuring the trigger, drag another REST Adapter into the integration as an invoke.

Select the appropriate REST connection.

This REST connection represents the external API that OIC needs to call.

For example, the integration could receive customer information through the OIC endpoint and then invoke a third-party customer management API.

Configure the target API’s:

  • Endpoint
  • HTTP method
  • Request parameters
  • Headers
  • Request payload
  • Response structure

The target API documentation should be used to determine the exact requirements.

Step 6: Map the Data

The mapper connects the data received from the REST trigger to the structure expected by the REST target.

For example:

Source:

customerName

Target:

name

Similarly:

email → customerEmail

country → countryCode

OIC’s mapper provides visual mapping capabilities and transformation functions.

You can also perform transformations such as:

  • String manipulation
  • Date formatting
  • Conditional logic
  • Numeric calculations
  • Concatenation

Correct mapping is one of the most important parts of REST API integration.

Step 7: Configure Headers and Parameters

REST APIs frequently require HTTP headers and parameters.

Common headers include:

  • Content-Type
  • Authorization
  • Accept

Some APIs may also require custom headers.

Query parameters can be used for filtering or controlling API requests.

For example:

/customers?status=active

Path parameters can also be used:

/customers/{customerId}

The REST Adapter configuration should match the API specification provided by the target system.

Step 8: Add Error Handling

Production integrations should always include appropriate error handling.

OIC allows developers to use scopes and fault handlers to manage errors.

For example, if the external REST API returns an HTTP 500 error, the integration can capture the fault and perform an appropriate action.

Possible actions include:

  • Logging the error
  • Sending an email notification
  • Calling an error-handling service
  • Storing failed transaction information
  • Returning a meaningful API response
  • Re-throwing the fault

The appropriate approach depends on the business requirement.

Step 9: Configure the REST Response

After the target REST API responds, OIC can return an appropriate response to the original caller.

For example:

{
  "status": "success",
  "message": "Customer created successfully"
}

You can use the mapper to transform the target application’s response into a simplified response for the API consumer.

This is particularly useful when the external application’s response contains more information than the calling application requires.

Step 10: Validate and Test the Integration

Before activating the integration, validate the design.

Check:

  • Connections
  • REST endpoint configuration
  • Request and response structures
  • Mappings
  • Authentication
  • Headers
  • Parameters
  • Fault handling

After validation, activate the integration in the appropriate environment.

You can then test the REST endpoint using tools such as Postman or another API client.

A typical test should include:

  1. Valid request
  2. Missing required fields
  3. Invalid authentication
  4. Invalid parameter values
  5. Target API failure
  6. Unexpected response

Testing different scenarios helps identify issues before production deployment.

Monitoring REST API Integrations in OIC

Once the integration is active, OIC monitoring tools can be used to review integration executions.

You can investigate successful and failed instances and review available tracking information and error details.

For production support, configure meaningful business identifiers where appropriate. For example, a customer ID, invoice number, or order number can make it easier to locate a particular transaction.

Best Practices for OIC REST API Integration

Follow these best practices when designing REST integrations:

1. Use meaningful integration names

Consistent naming makes integrations easier to manage.

2. Validate API documentation

Always confirm HTTP methods, authentication, headers, parameters, and payload structures from the target API documentation.

3. Minimize unnecessary API calls

Avoid repeatedly calling the same endpoint when the required information can be retrieved more efficiently.

4. Implement proper fault handling

Do not allow production errors to fail silently.

5. Use appropriate logging

Capture enough information to troubleshoot problems while avoiding unnecessary logging of sensitive data.

6. Design for scalability

Consider pagination, batching, API limits, and payload size when dealing with large volumes.

Conclusion

REST API integration is one of the most important capabilities of Oracle Integration Cloud. By using the OIC REST Adapter, organizations can expose APIs, consume third-party REST services, transform data, connect Oracle Fusion applications, and automate business processes.

A successful OIC REST integration requires more than simply configuring an endpoint. Developers need to understand authentication, HTTP methods, request and response structures, mappings, parameters, error handling, monitoring, and performance considerations.

If you are preparing for an Oracle Integration Cloud interview or working on real-world OIC projects, practicing REST API integrations with tools such as Postman can help you develop the practical skills required to design and troubleshoot enterprise integrations.

Write A Comment

Enquiry Now
close slider

    Enquiry

    What is Refresh icon