API Request and API Response flows
An endpoint answers from Sample responses until you give it a flow. A flow that starts with an API Request node can be the endpoint's implementation.
Build the flow
- Add an API Request node after the Start node.
- In the node, pick the API, Version and Operation the flow answers.
- Add the nodes that do the work. The request fields are columns, such as
pathParams.orderId. - Optionally end with an API Response node to set the status, headers and
body. Without one, the endpoint answers
200with the last rows as JSON.
A flow with an API Request node shows an API endpoint badge on the canvas. It opens the API's API Studio > Design > Endpoints.
Set the endpoint's implementation
Changing the implementation needs a draft version and the API design permission.
- Open the API and open API Studio > Design > Endpoints.
- On the endpoint's row, press Implementation.
- Choose Flow, then pick the flow. Only flows whose API Request node targets this operation are listed.
- Press Save.
To answer from the document again, choose Sample responses and save.
Publishing
Publishing refuses a synchronous endpoint whose flow contains a node that cannot answer a request directly. The message names the endpoint and the node. Replace the node, or move the work to a flow that runs on a schedule.