blokboard/ Open beta

Node reference

HTTP request

Call an API with query, body, headers, and auth

HTTP

HTTP request calls a web API and returns its response. Start with a GET request that reads data before adding authentication or a request that changes remote data.

Try it step by step

  1. Choose GET and enter an API URL you can access. Select JSON for a JSON endpoint; use Text when you want the response as text.
  2. Run once and inspect status, ok, and body. These are separate fields: the API’s returned data is inside body.
  3. If the API returns {"items":[{"name":"Notebook"}]}, set Iterate’s Items to {{httpRequest.output.body.items}} using the actual HTTP scope from the picker.

What to expect

A successful JSON response might include status: 200, ok: true, and body: {"items":[{"name":"Notebook"}]}. This is an illustrative response shape; your endpoint determines the body.

Things to check

  • Match the API’s documented method, query parameters, and body.
  • Use a saved HTTP credential for private APIs. Literal request headers are saved with the workflow.
  • Use an If node to branch on ok or status. Non-2xx responses still return their body.
  • Enable Include response headers when you need them. Enable Include response cookies on Desktop to access Set-Cookie values. These options can expose secrets in workflow output.
  • Try Desktop when browser CORS blocks the request. Network failures and timeouts still fail the node.

Keep learning

Parameters

SettingDefaultWhat it does
MethodGETHTTP operation required by the API. Start with GET for a read request.
URL(empty)Runs in the browser when possible. APIs that block browser CORS may require Blokboard Desktop.
Query parameters[]Named values added to the request URL as query parameters.
AuthenticationnoneCredential scheme required by the API. Choose a saved credential for private requests.
HTTP credential(empty)Stored encrypted in the selected runtime’s vault and resolved only while this node runs.
Username(empty)Username sent with the password from the selected HTTP credential.
API key locationheaderSend the saved API key in a header or URL query parameter as required by the API.
API key namex-api-keyName of the header or query parameter that carries the API key.
Request headers[]Literal values are saved with the workflow. Use Authentication for encrypted credentials.
BodynoneRequest body format. GET and HEAD cannot send a body.
JSON body(empty)Use an exact expression such as {{request_body}} to send an object or array directly.
Text body(empty)Text sent as the request body when Body is Text.
Form fields[]Named fields encoded as application/x-www-form-urlencoded request content.
Include response headersfalseReturns headers available to this runtime. They may contain sensitive values.
Include response cookiesfalseReturns Set-Cookie values as workflow data on Desktop. Browsers hide them. These values may contain session secrets.
Timeout (ms)30000Set to 0 to wait until the workflow is stopped.
Response bodyautoParse the response as JSON or text, or select automatically from its content type.
Maximum response (bytes)10485760Stops reading when the response exceeds this size. Set to 0 for no limit.
On failurestopChoose whether a failed execution stops the workflow or only ends this path.
Retry attempts0How many additional attempts to make after the first failure.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

Method: Choices: GET (GET), POST (POST), PUT (PUT), PATCH (PATCH), DELETE (DELETE), HEAD (HEAD), OPTIONS (OPTIONS).

Authentication: Choices: None (none), Bearer token (bearer), Basic auth (basic), API key (apiKey).

HTTP credential: Shown when authentication is not none. Select your own http connection. See connection setup.

Username: Shown when authentication is basic.

API key location: Choices: Header (header), Query parameter (query). Shown when authentication is apiKey.

API key name: Shown when authentication is apiKey.

Body: Choices: None (none), JSON (json), Text (text), Form URL encoded (form).

JSON body: Shown when bodyType is json.

Text body: Shown when bodyType is text.

Form fields: Shown when bodyType is form.

Include response cookies: Available under More options.

Timeout (ms): Available under More options. Limits: minimum 0.

Response body: Choices: Auto detect (auto), JSON (json), Text (text). Available under More options.

Maximum response (bytes): Available under More options. Limits: minimum 0.

On failure: Choices: Stop workflow (stop), Continue (continue). Available under More options.

Retry attempts: Available under More options. Limits: minimum 0.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inanyOptional workflow data available to parameter expressions.

Outputs

PortValueDescription
outobjectHTTP status and parsed body, including error responses. Headers and cookies are optional.

out fields

FieldTypeDescription
statusnumberHTTP response status code.
statusTextstringHTTP response status text.
okbooleanWhether the response status is between 200 and 299.
headersobjectOptional response headers keyed by lowercase name. Cookies are separate.
cookiesarrayOptional Set-Cookie values exposed by this runtime.
bodyunknownParsed JSON or text response body.
bodyParseErrorstringPresent in JSON mode when the response body had to be returned as text.
durationMsnumberElapsed request time in milliseconds.