Skip to main content

Invoke OpenAPI

Overview

The Invoke OpenAPI node sends an HTTP request through a configured OpenAPI service and outputs the JSON response as a DataObject.

Purpose

Use this node when a workflow needs to retrieve or submit data through a REST API described by an OpenAPI specification, or through a manually configured API path on an OpenAPI service.

Configuration

FieldDescription
OpenAPI ServiceSelect an existing OpenAPI service, or click New Configuration to create one inline. See Open API Service.
OperationFor services without an uploaded OpenAPI specification, choose the HTTP method manually.
PathFor services without an uploaded OpenAPI specification, enter the request path manually.
Select PathFor services with an OpenAPI specification, choose the operation path from the service definition. Selecting a path can prefill headers, body type, path parameters, query parameters, and body hints.
HeadersOptional request headers as key/value pairs. Values can use workflow properties.
Body TypeRequest body mode: None, Raw (JSON), or Form-Data.
Body (JSON)JSON request body used when Raw (JSON) is selected.
Body (Form-Data)Form-data key/value pairs used when Form-Data is selected.
Path ParametersValues that replace placeholders in the URL path, such as {petId}.
Query ParametersQuery string parameters appended to the request URL.

Outputs

OutputData TypeCollectionDescription
DataObjectDataObjectFalseJSON response body returned by the API.

Properties

PropertyFlowDataTypeDescription
OPEN_API_INFOJsonNodeOpenAPI info object when available from the service specification.
OPEN_API_OPERATIONJsonNodeOpenAPI operation object when available from the selected path.
REQUEST_URLStringRequest URL
REQUEST_METHODStringRequest Method
REQUEST_HEADERSJsonNodeRequest Headers
REQUEST_BODYStringRequest Body
RESPONSE_CODEIntegerResponse Code
RESPONSE_STATUS_TEXTStringResponse Status Text
RESPONSE_HEADERSJsonNodeResponse Headers

Processing Logic

At runtime, the node loads the selected OpenAPI service. If the service has an OpenAPI specification, it resolves the selected operation and base URL from the service/specification. Otherwise, it uses the manually selected operation and path. It evaluates expressions in the configured body and request values, builds the HTTP request, sends it asynchronously, validates that the response body is non-empty JSON, stores request and response metadata properties, and emits the response JSON as a DataObject. Non-success HTTP responses fail the node.

Examples

The screenshot below shows a configured node calling the /pet/{petId} path of a Petstore service, with an api_key header and a petId path parameter:

Notes / Limitations

  • The response body must be valid JSON. Non-JSON responses fail the node.
  • Non-success HTTP responses fail the node with the status code and response JSON.
  • The GeneralNode dialog includes a Properties tab and View Output preview when the node is configured.