HTTP request
Changes dataVersion 2
Calls any web API and brings its answer into the flow, page after page if needed.
Settings
| Setting | What it is |
|---|---|
| Method | "GET" or "POST" or "PUT" or "PATCH" or "DELETE" |
| URLRequired | text |
| Query parameters | Appended to the URL and encoded; a value can come from an earlier step. |
| Headers | A value can come from an earlier step. Credentials belong in Sign in with above, not in a typed header. |
| Body | Text with {{ }} expressions; a whole-value expression that yields an object is sent as JSON — or {{ node["Build body"] }} from a json.build node. |
| Body encoding | Base64 is decoded to bytes before the request leaves. |
| Response format | Base64 keeps a PDF or an image intact for file.write — set that node's Encoding to Base64 too, or it writes the characters instead of the bytes. An answer too large to read at once fails the step — read it in pages, or save it as a file. |
| File name | The workspace file the answer is saved to, up to 100 MB — saving again adds a version. The step answers the file's name, size and hash, never its bytes; read it with file.read. |
| Follow redirects | Switch off to read a 3xx and its Location header as data. |
| Sign in with | Composed here and never logged — the value is redacted in every view. |
| Header name | text |
| Parameter name | text |
| Token | text |
| User | text |
| Password | text |
| Pages | Walks the pages for you and returns every item in one list. Every page is one request of the same kind as this one, and the node refuses rather than hand you half a list. |
| Where is the link? | Most APIs put the next page's address in the answer; some send it in the Link header instead. |
| Field path | The name of the field holding the next page's address, dots for the steps in between — read only when the link is in the response. |
| Parameter name | The query parameter this API counts pages in. The node stops at the first page with no items. |
| First page | Most APIs count from 1; some count from 0. |
| Offset parameter | The query parameter that says how many items to pass over. The node stops when a page answers fewer items than the page size. |
| Limit parameter | The query parameter that asks for a page size. |
| Page size | How many items to ask for per request — sent as the limit. |
| Cursor is in the response at | The name of the field holding the token for the next page. The node stops when it is missing or empty. |
| Send it as parameter | The query parameter the token travels back in. |
| Items are in | The name of the field holding the list in each answer, dots for the steps in between — leave it empty when the answer IS the list. |
| Stop after | Pages — at most 100. If the API still has more when this is reached, the node fails and says so instead of handing you a short list. |
| Connection | Any connection of this workspace — its own strategy composes the header, so this node never holds a credential. |
Technical details
| Key | Value |
|---|---|
method | "GET" or "POST" or "PUT" or "PATCH" or "DELETE", by default "GET" |
url | text |
query | object of text, by default {} |
headers | object of text or number or true/false, by default {} |
body | any JSONused when `method` is not "GET" |
bodyEncoding | "text" or "base64", by default "text"used when `method` is not "GET" |
responseFormat | "auto" or "text" or "base64" or "file", by default "auto" |
fileName | textused when `responseFormat` is "file" |
followRedirects | true/false, by default true |
auth.kind | "none" or "bearer" or "basic" or "header" or "query" or "connection", by default "none" |
auth.headerName | text, by default "Authorization"used when `auth.kind` is "header" |
auth.queryName | text, by default "access_token"used when `auth.kind` is "query" |
auth.token | textwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is one of "bearer", "header", "query" |
auth.username | textwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is "basic" |
auth.password | textwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is "basic" |
pagination.mode | "off" or "nextLink" or "pageNumber" or "offsetLimit" or "cursor", by default "off" |
pagination.linkFrom | "body" or "header", by default "body"used when `pagination.mode` is "nextLink" |
pagination.linkPath | textused when `pagination.mode` is "nextLink" |
pagination.pageParam | text, by default "page"used when `pagination.mode` is "pageNumber" |
pagination.firstPage | number, by default 1used when `pagination.mode` is "pageNumber" |
pagination.offsetParam | text, by default "offset"used when `pagination.mode` is "offsetLimit" |
pagination.limitParam | text, by default "limit"used when `pagination.mode` is "offsetLimit" |
pagination.pageSize | number, by default 100used when `pagination.mode` is "offsetLimit" |
pagination.cursorPath | text, by default "meta.next_cursor"used when `pagination.mode` is "cursor" |
pagination.cursorParam | text, by default "cursor"used when `pagination.mode` is "cursor" |
pagination.itemsPath | textused when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor" |
pagination.maxPages | number, by default 20used when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor" |
connection | texta connection id from `requires.connections` (any provider), or empty; used when `auth.kind` is "connection" |
Output
| Field | Type |
|---|---|
statusStatus code | number |
headersResponse headers | object |
bodyResponse body | any |
bodyEncodingBody encoding — text, base64 or file | string |
bodySizeBytesResponse body size (bytes) | number |
pagesPages fetched (only with pagination on) | number |
Sample output, and the expression for each field
- body
- items
- [0]1
- [1]2
- items
- bodyEncoding"text"
- bodySizeBytes15
- headers
- content-type"application/json"
- status200
Errors
When a step of this node stops a run, the run page shows a code. Look it up:
Example step
The step as a flow file holds it. Replace each value in <…>.
{
"config": {
"auth": {
"headerName": "Authorization",
"kind": "none",
"queryName": "access_token"
},
"bodyEncoding": "text",
"connection": "",
"fileName": "",
"followRedirects": true,
"headers": {},
"method": "GET",
"pagination": {
"cursorParam": "cursor",
"cursorPath": "meta.next_cursor",
"firstPage": 1,
"itemsPath": "",
"limitParam": "limit",
"linkFrom": "body",
"linkPath": "",
"maxPages": 20,
"mode": "off",
"offsetParam": "offset",
"pageParam": "page",
"pageSize": 100
},
"query": {},
"responseFormat": "auto",
"url": "<url>"
},
"label": "HTTP request",
"type": "core.http",
"version": 2
}Older versions
A flow that already has this version keeps running it. A new step always gets the newest.
Version 1
| Setting | What it is |
|---|---|
| Method | "GET" or "POST" or "PUT" or "PATCH" or "DELETE" |
| URLRequired | text |
| Query parameters | Appended to the URL and encoded; a value can come from an earlier step. |
| Headers | A value can come from an earlier step. Credentials belong in Sign in with above, not in a typed header. |
| Body | Text with {{ }} expressions; a whole-value expression that yields an object is sent as JSON — or {{ node["Build body"] }} from a json.build node. |
| Body encoding | Base64 is decoded to bytes before the request leaves. |
| Response format | Base64 keeps a PDF or an image intact for file.write — set that node's Encoding to Base64 too, or it writes the characters instead of the bytes. An answer too large to read at once fails the step — read it in pages, or save it as a file. |
| File name | The workspace file the answer is saved to, up to 100 MB — saving again adds a version. The step answers the file's name, size and hash, never its bytes; read it with file.read. |
| Follow redirects | Switch off to read a 3xx and its Location header as data. |
| Sign in with | Composed here and never logged — the value is redacted in every view. |
| Header name | text |
| Parameter name | text |
| Token | text |
| User | text |
| Password | text |
| Pages | Walks the pages for you and returns every item in one list. Every page is one request of the same kind as this one, and the node refuses rather than hand you half a list. |
| Where is the link? | Most APIs put the next page's address in the answer; some send it in the Link header instead. |
| Field path | The name of the field holding the next page's address, dots for the steps in between — read only when the link is in the response. |
| Parameter name | The query parameter this API counts pages in. The node stops at the first page with no items. |
| First page | Most APIs count from 1; some count from 0. |
| Offset parameter | The query parameter that says how many items to pass over. The node stops when a page answers fewer items than the page size. |
| Limit parameter | The query parameter that asks for a page size. |
| Page size | How many items to ask for per request — sent as the limit. |
| Cursor is in the response at | The name of the field holding the token for the next page. The node stops when it is missing or empty. |
| Send it as parameter | The query parameter the token travels back in. |
| Items are in | The name of the field holding the list in each answer, dots for the steps in between — leave it empty when the answer IS the list. |
| Stop after | Pages — at most 100. If the API still has more when this is reached, the node fails and says so instead of handing you a short list. |
Technical details
| Key | Value |
|---|---|
method | "GET" or "POST" or "PUT" or "PATCH" or "DELETE", by default "GET" |
url | text |
query | object of text, by default {} |
headers | object of text or number or true/false, by default {} |
body | any JSONused when `method` is not "GET" |
bodyEncoding | "text" or "base64", by default "text"used when `method` is not "GET" |
responseFormat | "auto" or "text" or "base64" or "file", by default "auto" |
fileName | textused when `responseFormat` is "file" |
followRedirects | true/false, by default true |
auth.kind | "none" or "bearer" or "basic" or "header" or "query", by default "none" |
auth.headerName | text, by default "Authorization"used when `auth.kind` is "header" |
auth.queryName | text, by default "access_token"used when `auth.kind` is "query" |
auth.token | textwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is one of "bearer", "header", "query" |
auth.username | textwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is "basic" |
auth.password | textwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is "basic" |
pagination.mode | "off" or "nextLink" or "pageNumber" or "offsetLimit" or "cursor", by default "off" |
pagination.linkFrom | "body" or "header", by default "body"used when `pagination.mode` is "nextLink" |
pagination.linkPath | textused when `pagination.mode` is "nextLink" |
pagination.pageParam | text, by default "page"used when `pagination.mode` is "pageNumber" |
pagination.firstPage | number, by default 1used when `pagination.mode` is "pageNumber" |
pagination.offsetParam | text, by default "offset"used when `pagination.mode` is "offsetLimit" |
pagination.limitParam | text, by default "limit"used when `pagination.mode` is "offsetLimit" |
pagination.pageSize | number, by default 100used when `pagination.mode` is "offsetLimit" |
pagination.cursorPath | text, by default "meta.next_cursor"used when `pagination.mode` is "cursor" |
pagination.cursorParam | text, by default "cursor"used when `pagination.mode` is "cursor" |
pagination.itemsPath | textused when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor" |
pagination.maxPages | number, by default 20used when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor" |