Skip to main content

API Request and API Response flows

API Studio

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​

  1. Add an API Request node after the Start node.
  2. In the node, pick the API, Version and Operation the flow answers.
  3. Add the nodes that do the work. The request fields are columns, such as pathParams.orderId.
  4. Optionally end with an API Response node to set the status, headers and body. Without one, the endpoint answers 200 with 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.

  1. Open the API and open API Studio > Design > Endpoints.
  2. On the endpoint's row, press Implementation.
  3. Choose Flow, then pick the flow. Only flows whose API Request node targets this operation are listed.
  4. 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.