When creating an app from a REST Swagger 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 in the
Reply Settings tab of the
ReceiveHTTPMessage trigger.
Follow these steps to configure your HTTP reply:
Procedure
-
Open the REST trigger configuration pane by clicking on it.
-
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.
-
Open the
ConfigureHTTPResponse activity by clicking on it and configure it 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.
-
Click
Save.
-
Configure the
Return activity by mapping the
code and
body (which is currently of data type
any).
-
Click
Save.
-
In the
Map from Flow Outputs tab in the
ReceiveHTTPMessage trigger, map the
code and
body to the corresponding elements from the flow output.
-
Click
Save.
Copyright © Cloud Software Group, Inc. All rights reserved.