Create a Lookup

post

/ic/api/integration/v1/lookups

Creates a lookup. The request body must contain:

  • name: defines the name of the lookup. For example:
    "name":"myLookup"
  • columns: defines the domains or adapters to map. The request body can contain two or more columns. For example:
    "columns":["rightnow","soap"]
  • rowData: specifies the mappings to each adapter or domain. For example:
    "rows":[{"rowData":["RN1","SOAP1"]},{"rowData":["RN2","SOAP2"]}]

Request

Query Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : columns
Type: array
Column List
Show Source
Nested Schema : rows
Type: array
Row List
Show Source
Nested Schema : SuiteLookupRowData
Type: object
Show Source
Nested Schema : row-data
Type: array
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful operation

400 Response

Bad request, missing required data

500 Response

Server error
Back to Top

Examples

The following example shows how to create a lookup by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL. For more information about endpoint URL structure, see Send Requests.

This command creates a lookup with the name and values specified in the request body.

The command consumes JSON data.

curl -X POST -H 'Authorization: Bearer access_token' -H "Content-Type:application/json" -d @lookup.json https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/lookups?integrationInstance=service-instance

Example: Request Body to map country codes to country names

The following example shows the contents of a request body in JSON format. This is the contents of the lookup.json file listed in the cURL command with the -d option.

In this example, we are mapping the short country codes to the country names.

Let's say we have these country codes:

  • IN India
  • USA United States
  • CA Canada
  • FR France
  • GR Germany

We can create a lookup called CountryLookup to map these values and then reference this lookup in any integration. Note that you can have as many columns as needed, but here we only needed two columns.

{"columns":["CountryCode","CountryName"],"rows":[{"rowData":["IN","India"]},{"rowData":["USA","United States"]}, {"rowData":["CA","Canada"]},{"rowData":["FR","France"]},{"rowData":["GR","Germany"]},],"name":"CountryLookup"}
Back to Top