Skip to main content

API Request node

Source

What it does​

The API Request node starts a flow when a request reaches an API Studio endpoint whose implementation is that flow. It emits one row that holds the request:

ColumnHolds
methodThe HTTP method, such as GET or POST.
pathThe request path after the version.
pathParamsThe path parameters by name.
queryThe query parameters by name.
headersThe request headers, without Authorization, Cookie, X-Api-Key or DataLug's own headers.
bodyThe parsed request body.

The node runs only for an API request. A scheduled or manual run of the flow fails at this node.

When to use​

  • You want an API Studio endpoint to answer from a flow instead of from Sample responses.
  • You want the request's parameters and body as columns in the nodes that follow.

Configure​

Select the node to open its settings in the side panel.

  • API: the API Studio API this flow implements.
  • Version: the version of that API.
  • Operation: the method and path this flow answers. Choosing one fills Request fields.
  • Request fields: the parameters and body fields offered as columns downstream, such as query.status or body.email. Each has a Location, a Name and a Type. You can add or remove fields by hand.

Ports​

PortDirectionKindNotes
inincontrolConnect from the Start node.
outoutdataOne row with the request.
erroroutcontrolReceives the row when the node fails.

Examples​

Look up an order by id.

The operation is GET /orders/{orderId}. The API Request node picks it, so Request fields holds pathParams.orderId. A Lookup node reads the order with that value, and an API Response node returns it as the body with status 200.

Troubleshooting​

SymptomCauseWhat to do
A scheduled run fails at this nodeThe flow ran without an API request.Run the flow through its endpoint.
A header is not in headersCredentials and DataLug's own headers are removed.Pass the value in a query parameter or the body.
The flow is not offered for an endpointNo API Request node targets that operation.Pick the same API and operation in this node.
The node is not in the Components panelThe node is not enabled for your account.Contact support.

See API Request and API Response flows.