Dynamic API Builder
A game-changing feature that automatically generates custom integration nodes for nLink by parsing OpenAPI (Swagger) documentation or cURL commands, completely eliminating the need for manual coding.
How It Works
The Dynamic API Builder streamlines the integration process by converting complex API specifications into ready-to-use visual nodes through a robust 3-step pipeline.
- 1. Input & Parsing
Users can simply paste an OpenAPI document URL (JSON/YAML) or a cURL command into the Builder interface. The intelligent backend parser instantly destructs the specification to extract critical elements: Base URLs, Endpoints (Paths), Methods, Resources (Tags), Authentication Types, and all input variables (Path Variables, Query Params, JSON Body). - 2. Node Code Generation
Once parsed, the system automatically builds a new Community Node structure (e.g.,nlink-community.your_api). It programmatically generates thedefinition.json:- Operations & Resources: Mapped directly from Swagger Endpoints and Tags.
- Properties: Dynamically typed inputs (string, number, boolean) with intelligent visibility (
displayOptions) tailored for each specific operation. - Hidden Metadata: Imbeds essential routing instructions into an internal mapping layer, mapping operations back to their true HTTP methods and endpoint URIs.
- 3. Universal Execution Engine
No redundant code is ever produced. Instead of hardcoding logic for thousands of endpoints, the generated node relies on a single masterpiece—the Universal Execution Template. When an operation is triggered, this engine:1. Retrieves the true Method and URI from the hidden mapping. 2. Automatically identifies Path Variables and performs regex substitution (e.g., replaces {id} with user input). 3. Compiles all relevant inputs into Query Strings or JSON Body payloads. 4. Securely fetches and attaches the correct Authentication Tokens. 5. Executes the raw HTTP request natively and flawlessly.
Advanced Capabilities
The builder is designed entirely around scalability and flexibility for end users:
- Selective Generation
Massive OpenAPI files (like ERP systems with thousands of endpoints) can overwhelm visual builders. To prevent browser freezing, the module features a selective Tree-View that allows developers to check only the specific Tags/Endpoints they actually need. - Flexible Authentication
Whether the API requires standard API Keys, Bearer Tokens, or complex OAuth2 flows, the generated node can automatically bind to system credentials or construct tailored HTTP authentication templates to safeguard requests.
Note for Developers: Generating a new Node might require a server reload to register the new definition.json structure to the Canvas. Hot-reloading capabilities are continuously being enhanced.
Example: Parsing cURL to Node
Imagine you have a standard API request from a provider. You can copy the raw cURL command into the Dynamic API Builder:
curl -X POST https://api.stripe.com/v1/customers \
-H "Authorization: Bearer sk_test_..." \
-d name="Jenny Rosen" \
-d email="jennyrosen@example.com"The builder will effortlessly strip the configuration into a mapped nlink-community node that automatically constructs the input parameters (name, email) and routes the internal execution flow to POST https://api.stripe.com/v1/customers securely.
