Drupal is a registered trademark of Dries Buytaert

API Insight Lab provides API performance testing and load testing for Drupal. Test endpoints, validate responses, chain requests, compare snapshots, and manage multiple environments—all in one UI.

Features

Load Testing

The Load Tester provides comprehensive API performance testing capabilities:

  • Virtual Users (VUs): Configure concurrent users from 1 to 100
  • Iterations: Set the number of requests per VU (1 to 1000)
  • HTTP Methods: Support for GET, POST, PUT, DELETE, and PATCH
  • Request Body: JSON, form-data, and raw body formats
  • Authentication: Basic Auth, Bearer Token, and API Key support
  • Headers: Add custom request headers
  • Query Parameters: Configure URL query parameters
  • Timeout: Configurable request timeout (1-120 seconds)

Phased Load Testing

Enable sophisticated load patterns with phase configuration:

  • Warmup Phase: Start with a percentage of max VUs to warm up the system
  • Ramp-up Phase: Gradually increase VUs to maximum over specified duration
  • Sustain Phase: Maintain peak load for testing stability
  • Ramp-down Phase: Gradually decrease VUs to simulate traffic reduction

Presets available: Standard Load, Stress Test, Spike Test

Performance Metrics

After running a test, view comprehensive metrics:

  • Dashboard Cards: VUs, Average RPS, Peak RPS, Error Rate
  • Load Summary Chart: Interactive chart showing VUs vs RPS with phase markers
  • Response Time Distribution: Min, Max, Mean, Median, Standard Deviation
  • Percentiles: P50, P75, P90, P95, P99 latency values
  • Bottleneck Analysis: DNS, TCP, TLS, Server Processing, Download timing
  • Cache Analytics: Track Drupal cache hits/misses via X-Drupal-Cache header
  • Performance Grades: Automatic grading (Excellent, Good, Acceptable, Slow)

Snapshots

Save and compare API response snapshots to track changes over time:

  • Save snapshots after running tests with URL, method, headers, response body, and metrics
  • Snapshots are grouped by API endpoint (URL + method)
  • Enable Compare Mode to select two snapshots for side-by-side comparison
  • View performance metrics differences and response body visual diff
  • Export snapshots via the Config Manager

Environments

Manage multiple environment profiles for testing across different servers:

  • Create environments with Name, Base URL, and Color (green, yellow, red, blue, gray)
  • Define variables like API keys, auth tokens, and user IDs
  • Use {{VARIABLE_NAME}} syntax in URLs, headers, and body
  • Switch environments via dropdown in Load Tester header
  • Relative URLs automatically use the environment's base URL

Request Chaining

Create multi-step API workflows with variable passing:

  • Add steps with URL, method, headers, and body for each API request
  • Extract values from responses using JSONPath (e.g., $.data.user.id)
  • Use extracted variables in subsequent steps with {{variableName}}
  • Run chains to execute all steps sequentially with step-by-step results

Config Manager

Centralized management for all configurations:

  • View presets, chains, and environments in one place
  • Search & filter by name, URL, or HTTP method
  • Bulk select, delete, and export configurations
  • Export as JSON with option to include/exclude sensitive auth data
  • Import with URL mapping for environment migration

Assertions

Validate API responses automatically:

  • Status Code: Validate HTTP status (equals, not equals)
  • Response Time: Check latency thresholds (less than, greater than)
  • Body Contains: Verify response contains specific text
  • JSONPath Match: Validate specific JSON values
  • Header Check: Verify response headers exist or match values

API Discovery

Automatically discover available REST resources in your Drupal site. Click on a resource to populate the Load Tester. Useful for testing Drupal's JSON:API and REST endpoints.

Post-Installation

  1. Navigate to Administration » Configuration » Development » API Insight Lab (/admin/config/development/api-insight-lab)
  2. The module requires the "Administer site configuration" permission
  3. Configure default settings in the Settings view:
    • Base URL for API requests
    • Default authentication type (None, Basic, Bearer, API Key)
    • Default timeout and concurrency values
  4. Start testing by entering an API URL in the Load Tester view

For frontend development, run npm install && npm run build in the react-ui/ directory.

For detailed installation and configuration instructions, please refer to the project's README file.

For feature requests and issue reports, create an issue here: API Insight Lab Issue Dashboard

Activity

Total releases
2
First release
Dec 2025
Latest release
2 months ago
Release cadence
0 days
Stability
50% stable

Releases

Version Type Release date
1.0.0 Stable Dec 25, 2025
1.0.x-dev Dev Dec 25, 2025