Configuring Rest API

About this task

Use Rest API Orachastration to send Journey fields as payload to other application.

To configure Rest API, complete the following steps:

Procedure

  1. From the Journey control panel within the Palette, drag-and-drop the Rest API control to the required part on Canvas.
    The Rest API Configuration dialog appears.
  2. Provide values for the following fields:
    • Name - Mandatory
    • Description - Optional
    • Rest URL - Provide an API on which you want to receive the data
    • API Details - Select the API method and the authentication mechanism. There are three API methods:
      • GET – It is used to fetch the data from destination endpoint configured in rest URL
      • POST - It is used to publish the data.
      • PUT - It is used for publish/update the records.

        There are four Authentication mechanism - Basic, API Key, Oauth and None

    Based on the selected API method and Authentication mechanism following fields appears:

    If you select Basic Authentication mechanism, then section Enter Credentials to authenticate appears with fields User name and Password.

    If you select API Key Authentication mechanism, then section Enter Credentials to authenticate appears with fields Key Name and Key Value.

    If you select Oauth Authentication mechanism, then section Enter Credentials to authenticate appears with fields Username, Password, Client ID, Client Secret and Token URL.

    If you select None Authentication mechanism, no authorization details required.

  3. Click Next.
    The Request Payload page appears.
  4. Select the Rest API type from JSON or XML and add payload. Click on Sample Payload for reference.
    Note: Request Payload screen is available for POST and PUT API methods. For GET the fields remain disabled.
  5. Click Next.
    The Response Fields Mapping page appears.
  6. Select JourneyFields from the dropdown and in the Response Fields mention the response received from the destination system.
    Note: Response Mapping is mandatory for GET API Method but not for POST and PUT API methods.
    Responses are grouped in five classes:
    1. Informational responses (100–199)
    2. Successful responses (200–299)
    3. Redirects (300–399)
    4. Client errors (400–499)
    5. Server errors (500–599)
  7. Click Save
    Rest API will be configured and saved in Journey