FlowmageDocs

HTTP request

Changes dataVersion 2

Calls any web API and brings its answer into the flow, page after page if needed.

Settings

SettingWhat it is
Method"GET" or "POST" or "PUT" or "PATCH" or "DELETE"
URLRequiredtext
Query parametersAppended to the URL and encoded; a value can come from an earlier step.
HeadersA value can come from an earlier step. Credentials belong in Sign in with above, not in a typed header.
BodyText with {{ }} expressions; a whole-value expression that yields an object is sent as JSON — or {{ node["Build body"] }} from a json.build node.
Body encodingBase64 is decoded to bytes before the request leaves.
Response formatBase64 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 nameThe 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 redirectsSwitch off to read a 3xx and its Location header as data.
Sign in withComposed here and never logged — the value is redacted in every view.
Header nametext
Parameter nametext
Tokentext
Usertext
Passwordtext
PagesWalks 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 pathThe 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 nameThe query parameter this API counts pages in. The node stops at the first page with no items.
First pageMost APIs count from 1; some count from 0.
Offset parameterThe query parameter that says how many items to pass over. The node stops when a page answers fewer items than the page size.
Limit parameterThe query parameter that asks for a page size.
Page sizeHow many items to ask for per request — sent as the limit.
Cursor is in the response atThe name of the field holding the token for the next page. The node stops when it is missing or empty.
Send it as parameterThe query parameter the token travels back in.
Items are inThe 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 afterPages — 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.
ConnectionAny connection of this workspace — its own strategy composes the header, so this node never holds a credential.
Technical details
KeyValue
method"GET" or "POST" or "PUT" or "PATCH" or "DELETE", by default "GET"
urltext
queryobject of text, by default {}
headersobject of text or number or true/false, by default {}
bodyany 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"
fileNametextused when `responseFormat` is "file"
followRedirectstrue/false, by default true
auth.kind"none" or "bearer" or "basic" or "header" or "query" or "connection", by default "none"
auth.headerNametext, by default "Authorization"used when `auth.kind` is "header"
auth.queryNametext, by default "access_token"used when `auth.kind` is "query"
auth.tokentextwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is one of "bearer", "header", "query"
auth.usernametextwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is "basic"
auth.passwordtextwrite `{{ 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.linkPathtextused when `pagination.mode` is "nextLink"
pagination.pageParamtext, by default "page"used when `pagination.mode` is "pageNumber"
pagination.firstPagenumber, by default 1used when `pagination.mode` is "pageNumber"
pagination.offsetParamtext, by default "offset"used when `pagination.mode` is "offsetLimit"
pagination.limitParamtext, by default "limit"used when `pagination.mode` is "offsetLimit"
pagination.pageSizenumber, by default 100used when `pagination.mode` is "offsetLimit"
pagination.cursorPathtext, by default "meta.next_cursor"used when `pagination.mode` is "cursor"
pagination.cursorParamtext, by default "cursor"used when `pagination.mode` is "cursor"
pagination.itemsPathtextused when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor"
pagination.maxPagesnumber, by default 20used when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor"
connectiontexta connection id from `requires.connections` (any provider), or empty; used when `auth.kind` is "connection"

Output

FieldType
statusStatus codenumber
headersResponse headersobject
bodyResponse bodyany
bodyEncodingBody encoding — text, base64 or filestring
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
  • 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
SettingWhat it is
Method"GET" or "POST" or "PUT" or "PATCH" or "DELETE"
URLRequiredtext
Query parametersAppended to the URL and encoded; a value can come from an earlier step.
HeadersA value can come from an earlier step. Credentials belong in Sign in with above, not in a typed header.
BodyText with {{ }} expressions; a whole-value expression that yields an object is sent as JSON — or {{ node["Build body"] }} from a json.build node.
Body encodingBase64 is decoded to bytes before the request leaves.
Response formatBase64 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 nameThe 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 redirectsSwitch off to read a 3xx and its Location header as data.
Sign in withComposed here and never logged — the value is redacted in every view.
Header nametext
Parameter nametext
Tokentext
Usertext
Passwordtext
PagesWalks 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 pathThe 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 nameThe query parameter this API counts pages in. The node stops at the first page with no items.
First pageMost APIs count from 1; some count from 0.
Offset parameterThe query parameter that says how many items to pass over. The node stops when a page answers fewer items than the page size.
Limit parameterThe query parameter that asks for a page size.
Page sizeHow many items to ask for per request — sent as the limit.
Cursor is in the response atThe name of the field holding the token for the next page. The node stops when it is missing or empty.
Send it as parameterThe query parameter the token travels back in.
Items are inThe 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 afterPages — 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
KeyValue
method"GET" or "POST" or "PUT" or "PATCH" or "DELETE", by default "GET"
urltext
queryobject of text, by default {}
headersobject of text or number or true/false, by default {}
bodyany 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"
fileNametextused when `responseFormat` is "file"
followRedirectstrue/false, by default true
auth.kind"none" or "bearer" or "basic" or "header" or "query", by default "none"
auth.headerNametext, by default "Authorization"used when `auth.kind` is "header"
auth.queryNametext, by default "access_token"used when `auth.kind` is "query"
auth.tokentextwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is one of "bearer", "header", "query"
auth.usernametextwrite `{{ secret.NAME }}`, never the value; used when `auth.kind` is "basic"
auth.passwordtextwrite `{{ 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.linkPathtextused when `pagination.mode` is "nextLink"
pagination.pageParamtext, by default "page"used when `pagination.mode` is "pageNumber"
pagination.firstPagenumber, by default 1used when `pagination.mode` is "pageNumber"
pagination.offsetParamtext, by default "offset"used when `pagination.mode` is "offsetLimit"
pagination.limitParamtext, by default "limit"used when `pagination.mode` is "offsetLimit"
pagination.pageSizenumber, by default 100used when `pagination.mode` is "offsetLimit"
pagination.cursorPathtext, by default "meta.next_cursor"used when `pagination.mode` is "cursor"
pagination.cursorParamtext, by default "cursor"used when `pagination.mode` is "cursor"
pagination.itemsPathtextused when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor"
pagination.maxPagesnumber, by default 20used when `pagination.mode` is one of "nextLink", "pageNumber", "offsetLimit", "cursor"