Add the REST Adapter as a Trigger (Source) Connection

After creating an integration “EBS Site”, you need to add a trigger (source) connection in the integration. The trigger (source) connection can be any application adapters suitable for your integrations. In this example, the REST Adapter is used for the integration.

Perform the following steps to add the REST Adapter as a trigger (source) connection:

  1. In the Create Order integration canvas, locate the "RESTSample" connection that you created earlier by entering "RESTSample" in the Connections field.

  2. Drag RESTSample from the Connections panel on the right to the Trigger (Source) area on the canvas.

    The Configure REST Endpoint wizard appears.

  3. Enter the following information in the Basic Info page:

    • What do you want to call your endpoint? - Enter the name of this endpoint, such as "RESTSample".

    • What does this endpoint do? - Enter the usage of this endpoint, such as "Provide REST endpoint with input payload to create a site".

    • Select to configure multiple resources or verbs (maximum 11) - Leave this box unchecked.

    Click Next.

  4. Enter the following information in the Resource Configuation page:
    • What does this operation do? - Enter the usage of this operation, such as "Provide REST endpoint with input payload to create a site".

    • What is the endpoint's relative resource URI? - Enter “/site/”.

    • What action does the endpoint perform? - Select "POST" from the drop-down list.

    Ensure that you select the following two check boxes for this trigger (source) connection:

    • Configure a request payload for this endpoint

    • Configure this endpoint to receive the response

    Click Next.

  5. In the Request page, perform the following tasks:

    • In the "Select the request payload format" section, select JSON Sample.

    • Click <<inline>> to enter the following JSON information as the Request Sample JSON payload:

      {
       "site":{
        "SiteNumber":"123",
        "SiteName":"site",
        "SiteType":"type",
        "SiteStatus":"status",
        "BrandName":"brand",
        "Country":"United States",
        "Address1":"a1"
       }
      }
    • Click OK.

    • In the "What is the media-type as Request Body? (Content-Type Header)" section, select the JSON button as the type.

    Click Next.

  6. In the Response page, perform the following tasks:

    • Select JSON Sample as the response payload format for this example.

    • Click <<inline>> to enter the following JSON information as the Response Sample JSON payload:

      {
        "message":"Status message"
       }
      
    • Click OK.

    • In the "What is the media-type as Response Body? (Content-Type Header)" section, select the JSON button as the type.

    Click Next to display the Summary page and review the information you have entered.

  7. Click Done and click Save to save your work. The RESTSample connection now appears in the Trigger (Source) area on the canvas in the Invoke (Target) area.