LogoLogo
Documentation
Documentation
  • Getting Started
    • Introduction
    • Sign up to Developer Edition
    • Build Your First Agent
    • Developer Support
  • Core Concepts
    • Agent
      • Knowledge
      • Webhook
    • PII Masking
    • Sub-Agent
    • Intent
    • Workflow
      • Node
        • Input
        • Output
        • Loader
        • Display
        • API Node
        • Web Crawler
        • Table Write
        • Table Read
        • Ruleset
        • Upload Document
        • Javascript
        • Workflow
        • Loop
        • Document To Image
        • External Database
        • Storage Write
        • Storage Read
        • Fetch Document
        • Prompt
        • RAG Query
        • Vector Search
        • Emit Event
    • RAG
    • Model Hub
      • Entity Recognizers
    • Data Gateway
    • Rulesets
    • Code Snippets
    • Tables
    • Storage
    • Widget
  • Overview of GenAI
    • Introduction
    • Key concepts
      • Intent Classification
      • Inference
      • Generative AI Models
      • Large Language Models (LLMs)
      • Prompt Engineering
      • AI Agents
      • RAG (Retrieval Augmented Generation)
      • AI Workflow Automation
      • AI Agents vs LLM-based APPs
Powered by GitBook
On this page
  • Overview
  • Configurations
  • Example Use-Cases
  • Key Takeaways for Developers
Export as PDF
  1. Core Concepts
  2. Workflow
  3. Node

API Node

Overview

The API Call Node in UPTIQ Workbench enables workflows to interact with external APIs by performing HTTP requests. This node allows developers to fetch, send, update, or delete data from external services in a structured and automated manner.

By leveraging the API Call Node, developers can integrate their workflows with third-party APIs, internal services, or cloud endpoints, ensuring seamless data exchange between systems.

Configurations

Endpoint (Required)

  • The URL of the external API to which the request is sent.

  • Supports static URLs or dynamic variables fetched from workflow data.

Method (Required)

  • Defines the type of HTTP request to be made.

  • Supported methods: ✅ GET – Retrieve data from the API. ✅ POST – Send new data to the API. ✅ PUT – Update an existing resource. ✅ PATCH – Modify part of an existing resource. ✅ DELETE – Remove a resource.

Headers (Optional)

  • A set of key-value pairs representing HTTP headers to include in the request.

  • Example: { "Authorization": "Bearer <token>", "Content-Type": "application/json" }.

Parameters (Optional)

  • Query parameters to be appended to the URL.

  • Example: { "userId": "12345" } results in https://api.example.com/resource?userId=12345.

Request Body (For POST, PUT, PATCH requests only)

  • The payload sent with the request.

  • Can be in raw JSON format or key-value format.

  • Example: { "name": "John Doe", "email": "john@example.com" }.

Output Format

  • If the request is successful, the node outputs:

    jsonCopyEdit{ "data": <API response> }
  • If the request fails, the node outputs:

    jsonCopyEdit{ "error": <Error message> }

Example Use-Cases

Example 1: Fetching Data from an External API (GET Request)

A workflow needs to retrieve user details from a third-party service.

Configuration:

  • Endpoint: https://jsonplaceholder.typicode.com/todos/1

  • Method: GET

Response Output:

jsonCopyEdit{
  "data": {
    "userId": 1,
    "id": 1,
    "title": "delectus aut autem",
    "completed": false
  }
}

Example 2: Sending Data to an API (POST Request)

A workflow needs to create a new user record in an external system.

Configuration:

  • Endpoint: https://api.example.com/users

  • Method: POST

  • Headers: { "Content-Type": "application/json" }

  • Request Body:

    jsonCopyEdit{
      "name": "Jane Doe",
      "email": "jane@example.com",
      "role": "admin"
    }

Response Output (Success):

jsonCopyEdit{
  "data": {
    "id": "12345",
    "name": "Jane Doe",
    "email": "jane@example.com",
    "role": "admin"
  }
}

Response Output (Error):

jsonCopyEdit{
  "error": "Unauthorized request. Invalid API key."
}

Key Takeaways for Developers

✅ Seamless API Integration – Easily connect UPTIQ workflows with external APIs for data exchange. ✅ Supports All Major HTTP Methods – Perform GET, POST, PUT, PATCH, and DELETE requests. ✅ Flexible Configuration – Customize headers, query parameters, and request body as per API requirements. ✅ Handles API Responses Efficiently – Captures both successful data responses and error messages for better debugging. ✅ Use with Dynamic Variables – Fetch endpoint URLs and request data dynamically from previous nodes for dynamic API calls.

By leveraging the API Call Node, developers can extend UPTIQ Workbench workflows beyond internal processes, integrating them with external platforms, databases, and third-party applications for automated and intelligent data handling. 🚀

PreviousDisplayNextWeb Crawler

Last updated 3 months ago