🌐API Connector

The API connector enables data retrieval from REST APIs with flexible configuration options, supporting authentication, pre-requisite calls, and advanced data extraction.

Overview

Retrieve data from RESTful APIs for validation and comparison. The API connector supports:

  • βœ… Multiple HTTP methods (GET, POST, PUT, DELETE)

  • βœ… Custom headers and authentication

  • βœ… Complex request payloads

  • βœ… Pre-requisite API dependencies

  • βœ… JSONPath and XPath data extraction

  • βœ… JSON, XML, and other response formats

circle-info

Perfect for validating real-time data, testing API responses, and comparing data from service endpoints.

API Connection Configuration

βš™οΈ Configuration Parameters

Parameter
Description
Required

Source Name

Unique identifier for the API connection

βœ… Yes

Request Type

HTTP method (GET, POST, PUT, DELETE)

βœ… Yes

URL

API endpoint address

βœ… Yes

Parameters

Query parameters as key-value pairs

⚠️ Optional

Headers

Request metadata (auth, content-type)

⚠️ Optional

Body

Request payload for POST/PUT (JSON)

⚠️ Optional

Pre-requisite

Dependent API calls (up to 2 levels)

⚠️ Optional


πŸš€ Step-by-Step Configuration

Step 1: Select API as Source Connection

circle-info

Start by selecting API as your data source connector type.

  1. Navigate to Start Job

  2. Select API under Source Connection Type

  3. Enter a unique Source Name (e.g., API1, CustomerAPI)

  4. Click βœ… to confirm

API Source Selection

Step 2: Configure API Request

Supply all necessary request configuration details:

Configuration Fields:

  1. Enter the API Endpoint URL

  2. Select the appropriate Request Type

  3. Add Parameters (key-value pairs) if required

  4. Provide Headers for authentication or content type

  5. Include JSON Body for POST/PUT requests

  6. Configure Pre-requisite APIs if needed

API Configuration

Step 3: Pre-requisite APIs (Optional)

circle-info

Pre-requisite APIs are essential when the main API requires tokens or credentials with limited validity.

Use Cases:

Scenario
Solution

Token Expiration

Pre-requisite refreshes access token

Dynamic Auth

Generate new credentials on-demand

Session Setup

Establish session before main call

Data Lookup

Fetch ID before using in main request

Configuration Steps:

  1. Extract Value Path – Specify JSONPath to extract values

  2. Variable Mapping – Assign a variable name to extracted value

  3. Usage in Main API – Reference with #variable_name# syntax

circle-exclamation
Pre-requisite API Configuration

πŸ“– Example: View API Pre-requisite Demo


Step 4: Execute the API Call

Click Call API to execute the configured request and receive the response.

Call API
circle-info

Monitor the response status code and body for errors or unexpected data.


Step 5: Extract Data from Response

Define extraction rules to parse API responses:

Use JSONPath to extract specific fields:

JSONPath Referencearrow-up-right

  1. Use Response Extractor to define extraction rules

  2. Select Response Type (JSON, XML, etc.)

  3. Apply JSONPath/XPath to extract relevant values

  4. Click Extract to preview the data

Extract Data

Step 6: Verify Extracted Data

  • Click Verify to validate extracted values

  • Preview the extracted dataset

  • Proceed to next step if verification succeeds


πŸ“‹ Supported Response Formats

Format
Extension
Extractor
Support

JSON

.json

JSONPath

βœ… Full

XML

.xml

XPath

βœ… Full

CSV

.csv

Column mapping

βœ… Full

Plain Text

.txt

Regex

βœ… Full


πŸ“Š JSON Data Structures

Flat JSON

Perfect for simple tabular data:

Extraction: Use direct field names or JSONPath expressions.


Nested JSON

For hierarchical data structures:

Extraction: Use JSONPath like $.Users[*].Details.Food_Item


⚠️ Limitations & Constraints

circle-exclamation

Timeout Management

Scenario
Timeout
Action

Large responses

30 seconds

Use pagination

Complex extraction

30 seconds

Optimize JSONPath

Pre-requisite chain

60 seconds

Minimize call depth


πŸ” Authentication Methods

circle-info

Store sensitive credentials in environment variables or secrets management systems. Never hardcode tokens in configurations.


🎯 Common Use Cases

Real-time Data Comparison

Compare API response with database snapshot to detect discrepancies.

API Response Validation

Validate API returns correct data structure and types.

Multi-source Aggregation

Combine data from multiple APIs for comprehensive validation.

Service Health Monitoring

Regularly validate API responses for functionality and correctness.


Last updated