Configuring the REST Reply

When creating a REST app from a Swagger 2.0 or OpenAPI 3.0 API specification, the ReceiveHTTPMessage reply data type is set to any by default. You must explicitly configure the reply type.

To explicitly configure the reply type, add a ConfigureHTTPResponse Activity in the flow. This Activity must immediately precede the Return Activity in the flow.

You can configure custom codes that you want to use in the HTTP reply on the Reply Settings tab of the ReceiveHTTPMessage trigger.

Follow these steps to configure your HTTP reply:

    Procedure
  1. Open the REST trigger configuration pane by clicking it.
  2. On the Reply Settings tab of the ReceiveHTTPMessage REST trigger, configure the custom codes that you want to use. Refer to the section, "REST Trigger".
  3. Add a ConfigureHTTPResponse Activity immediately preceding the Return Activity in the flow.
  4. Open the ConfigureHTTPResponse Activity by clicking it and configure it as follows:
    1. On the Settings tab:
      1. If your flow is attached to multiple REST triggers, select the trigger in which you have configured the code you want to use from the Trigger Name drop-down menu. The Trigger Name field does not display if your flow is attached to only one REST trigger.
      2. Select a response code from the Code field menu. Only the codes configured in the selected trigger are displayed in the menu.
    2. The Input tab displays the schema for the response code. Map the elements or manually enter a value for the elements.
    3. Click Save.
  5. Configure the Return Activity by mapping the code and body (which is currently of data type any).
  6. Click Save.
  7. On the Map from Flow Outputs tab in the ReceiveHTTPMessage trigger, map the code and body to the corresponding elements from the flow output.
  8. Click Save.