Wajs - Dynamic OpenAPI icon

Wajs - Dynamic OpenAPI

Dynamic UI n8n node generated from OpenAPI

Wajs - Dynamic OpenAPI

AI-generated

Overview

This node dynamically interacts with any OpenAPI-defined API by fetching the OpenAPI JSON specification from a provided URL. It allows users to select an operation from the API and specify parameters (query, path, header, or body) to make the API request. The node constructs the request URL and headers based on the OpenAPI spec and user inputs, supports authentication via API key or token, and executes the HTTP request, returning the API response data. This node is useful for integrating with APIs without pre-built nodes, enabling flexible API calls based on OpenAPI specs.

Use Case Examples

  1. Calling a REST API operation defined in an OpenAPI spec by providing the spec URL, selecting the operation, and setting query/path/body parameters.
  2. Automating API requests to a service with dynamic parameter inputs and handling authentication via API key or token.
  3. Fetching data from an API endpoint by dynamically constructing the request URL and headers from the OpenAPI spec and user inputs.

Properties

Name Meaning
OpenAPI JSON URL URL to the OpenAPI JSON specification describing the API to interact with.
Operation The specific API operation to execute, loaded dynamically from the OpenAPI spec.
Parameters (Form) Collection of parameters to send with the API request, including name, location (query, path, header, body), and value.

Output

JSON

  • json - The JSON response data returned from the API call.

Dependencies

  • An HTTP client library for making requests (axios).
  • An API key or token credential for authentication (optional).

Troubleshooting

  • Ensure the OpenAPI JSON URL is correct and accessible; errors loading the spec will prevent operation selection.
  • Verify that all required path parameters are provided; missing path parameters will cause errors.
  • Check authentication credentials if the API requires them; missing or invalid tokens/api keys will cause authorization errors.
  • If the API response is an error, the node returns an error object with message and response data; review these for troubleshooting.

Links

  • OpenAPI Specification - Official documentation for the OpenAPI Specification used to describe RESTful APIs.
  • Axios HTTP Client - The HTTP client library used internally to make API requests.

Discussion