API Request node
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:
| Column | Holds |
|---|---|
method | The HTTP method, such as GET or POST. |
path | The request path after the version. |
pathParams | The path parameters by name. |
query | The query parameters by name. |
headers | The request headers, without Authorization, Cookie, X-Api-Key or DataLug's own headers. |
body | The 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.statusorbody.email. Each has a Location, a Name and a Type. You can add or remove fields by hand.
Ports
| Port | Direction | Kind | Notes |
|---|---|---|---|
in | in | control | Connect from the Start node. |
out | out | data | One row with the request. |
error | out | control | Receives 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
| Symptom | Cause | What to do |
|---|---|---|
| A scheduled run fails at this node | The flow ran without an API request. | Run the flow through its endpoint. |
A header is not in headers | Credentials and DataLug's own headers are removed. | Pass the value in a query parameter or the body. |
| The flow is not offered for an endpoint | No API Request node targets that operation. | Pick the same API and operation in this node. |
| The node is not in the Components panel | The node is not enabled for your account. | Contact support. |