Skip to content

$io.apicall ​

Server API reference.

Functions ​

$io.apicall.invoke ​

Invoke an API Call connection and return the HTTP response data, status, and headers.

Usage ​

js
$io.apicall.invoke(connectionName, data, queryParams, urlOverride)

Description ​

Executes the API request defined in the specified API Call connection and returns the HTTP result.

The connection determines:

  • Request Type (GET, POST, PUT, PATCH, DELETE, etc.)
  • Base URL for the request (unless overridden)
  • Authentication (Basic, Bearer, or Custom)
  • Custom headers
  • Preset request parameters or body data

Additional parameters provided to this function are merged with the connection’s configuration:

  • For GET requests: data is merged into the query string along with queryParams.
  • For POST/PUT/PATCH requests: data is merged into the request body, while queryParams is merged into the query string.
  • When key names overlap, passed values take precedence over preset values.

If urlOverride is provided, the request will use that URL instead of the connection’s configured URL.

Note: The data, queryParams, and urlOverride parameters may be omitted by passing null (or leaving them undefined). The timeout defaults to 10 seconds, with a maximum of 20 seconds.

Usage Scenarios ​

  • Call external REST endpoints from a ioLoop app or flow
  • Submit form data to third-party services (POST/PUT/PATCH)
  • Fetch data from public/private APIs with Basic/Bearer/Custom auth
  • Integrate no-code widgets with arbitrary HTTP APIs

Parameters ​

connectionName ​

Type: String

Required: Yes

The name of the API Call connection to use for this request.

data ​

Type: Object

Required: No

Request body for POST/PUT/PATCH, or additional query parameters for GET. Merged with the connection’s preset data. Pass null to omit.

queryParams ​

Type: Object

Required: No

Extra query string parameters to include in the request URL. Pass null to omit.

urlOverride ​

Type: String

Required: No

An absolute URL to use instead of the connection’s configured URL. Pass null to omit.

Output ​

Type: Promise

Resolves to an object: { status: Boolean, data: { data, status, statusText, headers } | null, err: String | null }

  • status: true if the request was successful; false otherwise
  • data.data: The response body from the target HTTP service
  • data.status: Numeric HTTP status code
  • data.statusText: HTTP status text
  • data.headers: Response headers map
  • err: Error message if the request failed