REST API - Request
Unified REST request block for calling web APIs. Configure method, headers, query parameters and payload. Choose async (non-blocking) or sync (wait for response) runtime. Optionally extract a value from JSON response using a dotted/array path.
π₯ Inputs
Enable Optional boolean to run the request. When False the block can skip sending a request (default True).
Server Address URL or endpoint to call (required).
Headers Optional headers as a dictionary or JSON string.
Query Params Optional query parameters as a dictionary or JSON string.
Payload Optional request body (will be sent according to selected body mode).
Response Path Optional text path used to extract a value from the JSON response (examples: data.items[0].id or items[2]).
(here sockets are inputs)
π€ Outputs
OK Boolean that is True when HTTP response indicates success.
Status Code HTTP status code returned by the server.
Error Error message for network/HTTP issues or parsing errors.
Response Text Raw response body as text.
Response JSON Parsed JSON object when available (otherwise None).
Response Headers Map of response headers.
Elapsed (ms) Request duration in milliseconds.
Extracted Data Value resolved from Response JSON using Response Path (or None if not found).
(here sockets are outputs)
πΉοΈ Controls
Method Choose HTTP method: GET / POST / PUT / PATCH / DELETE.
Body Mode Choose how to send Payload: json / form / raw.
Runtime Mode Choose execution mode: Async (non-blocking, keeps last result) or Sync (waits for response).
Timeout (s) Timeout in seconds for requests (invalid values fall back to a safe default).
Verify SSL Enable or disable TLS certificate verification (disable only for trusted test environments).
βοΈ How it works
When
Enableis true the block builds the request using theServer Address,Headers,Query ParamsandPayloadalong with chosenMethodandBody Mode.In
Syncmode the block waits until the HTTP request completes and returns the fresh result on the same evaluation cycle.In
Asyncmode the block sends the request without blocking; the block keeps the last completed result and updates outputs once the background request finishes.A JSON extraction path provided to
Response Pathresolves intoExtracted Dataif present; empty path yields no extraction.On HTTP or network errors the block exposes an
Errormessage and will mark the block result as invalid to help spotting failures.
π Usage
Set
Server Addressto your API endpoint.Provide optional
HeadersandQuery Paramsas dictionaries or JSON strings.Put request body in
Payloadand chooseBody Mode(use json for structured payloads).Choose
Runtime Mode:Use
Asyncto avoid blocking your scenario (good for UI/continuous pipelines).Use
Syncwhen you need the response immediately in the same run.
(Optional) Add a
Response Pathto extract a nested value from the JSON response for downstream logic.Trigger the call by setting
Enableto True or feeding a boolean trigger from other blocks.
π‘ Tips and Tricks
Prepare JSON payloads with the
Data to JSONblock before feeding intoPayloadfor cleaner structure and fewer formatting mistakes.Use
Parse Data DictionaryafterResponse JSONto safely access and route response fields if you prefer visual dictionary parsing.Log responses or periodic results using
CSV Exportto keep a timestamped record of API responses for analysis.For debugging flows, connect
ErrororResponse TexttoDebug Inputto print or inspect unexpected outputs.Combine with
Logic InputorRising Edgeto control exactly when requests are sent (for example send only once per event).
(here suggested blocks are from the provided list)
π οΈ Troubleshooting
Server Address empty or invalid: ensure
Server Addressis a full URL (including protocol if required).Request times out: increase
Timeout (s)or ensure network connectivity to the server.SSL verification errors in test environments: temporarily disable
Verify SSLonly if you trust the target.Unexpected JSON parsing: check
Response Textfirst; use a JSON-valid payload and setBody Modetojsonwhen sending structured data.No extracted data: verify the structure by inspecting
Response JSONand adjustResponse Pathusing dot/index notation (e.g. items[0].id).
π Privacy & Safety
Be careful with sensitive data in Headers or Payload (API keys, passwords). When logging responses or exporting data, ensure sensitive fields are redacted.
π§ Example workflows
Send sensor data periodically to a web service and record success/failure counts with
CSV Export.Post a structured JSON object created by
Data to JSONand then feedExtracted Datainto a decision flow (Logic Input/ thresholds).Use
Debug Inputto inspect server errors during development before switching to production logging.
Last updated