When creating an app from a REST Swagger API specification, the
ReceiveHTTPMessage reply data type is set to
any by default. 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 in the
Reply Settings tab of the
ReceiveHTTPMessage trigger.
Follow these steps to configure your HTTP reply:
Procedure
In the
Reply Settings tab of the
ReceiveHTTPMessage REST trigger, configure the custom codes that you want to use. Refer to the section, "REST Trigger" in the
Activities and Triggers Guide.
Add a
ConfigureHTTPResponse activity immediately preceding the
Return activity in the flow.
Configure the
ConfigureHTTPResponse activity as follows:
In the
Settings tab:
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.
Select a response code from the
Code field menu. Only the codes configured in the selected trigger are displayed in the menu.
The
Input tab displays the schema for the response code. Map the elements or manually enter a value for the elements.
Configure the
Return activity by mapping the
code and
responseBody (which is currently of data type
any).
In the
Map from Flow Outputs tab in the
ReceiveHTTPMessage trigger, map the
code and
responseBody to the corresponding elements from the flow output.