API Tests
ThousandEyes API tests offer a powerful tool for monitoring and analyzing the performance of web API endpoints within your application ecosystem. These tests are designed to provide visibility into how your APIs are performing from the perspective of ThousandEyes Cloud or Enterprise Agents, which are strategically deployed vantage points around the globe or within your own infrastructure.
The core idea behind ThousandEyes API tests is to simulate API calls to your critical endpoints and measure their availability, response times, and functional performance. You can configure these tests to make single or multiple API calls in a sequence, with the ability to pass data (like variables) from one call to the next. This is facilitated by an intuitive feature called the Step Builder, which guides you through setting up these calls without requiring deep programming knowledge—though some familiarity with JSON syntax and API specifications can be helpful for more complex setups.
Key features include:
Multi-Step Testing: You can chain multiple API requests together, mimicking real-world workflows, such as authentication followed by data retrieval.
Assertions: You can set rules to validate API responses, ensuring they meet expected standards (e.g., an HTTP status code of 200 for success).
Proxy Support: Tests can be configured to use either agent-level or test-specific proxy settings, with options for static or PAC proxies, though network measurements to the proxy are off by default.
Performance Metrics: The tests capture detailed timing data, like API transaction time, and completion rates, which help you spot slowdowns or failures.
No Browser Dependency: Unlike some other ThousandEyes test types, API tests don’t rely on a browser, though they do require the BrowserBot component on agents for execution.
Supported Endpoints
While you don’t need JavaScript expertise to get started, understanding your API’s specification (e.g., endpoints, expected responses) is key. The tests support any HTTP endpoint, but advanced features like variable processing are optimized for JSON responses. Note that API tests don’t automatically follow HTTP redirects that switch protocols (e.g., HTTP to HTTPS), so you’d need to account for that in your setup.
Authentication
The API test type supports both client certificate authentication and disable SSL verification.
Add client certificates under Test Settings, in the TLS section in the Advanced Settings section. This setting applies to the entire API test and all steps within it.
Disabling SSL verification for each API call can be configured in the Authentication tab of the API Step Builder. This setting applies to a single step (API call) of the API test.
Proxy Settings
Proxy settings for your API test can use either Enterprise Agent proxy settings, or use a test-level proxy setting that overrides the agent setting. The feature works with both static and PAC proxies. Network measurements to the proxy are off by default, but can be enabled. For more information about proxy metrics, see Collecting Proxy Metrics.
Using API Tests with Enterprise Agents
API tests rely on the ThousandEyes BrowserBot component. If you want to run API tests from your own Enterprise Agents, those agents need to be installed on devices that can support BrowserBot. To find out if your devices support BrowserBot, see Enterprise Agent System Requirements and Cisco Devices Support Matrix.
Because API tests use BrowserBot, you can't select specific interfaces for Enterprise Agents when configuring API tests. For more information about interface selection, see Enterprise Agent interface selection. For more information about BrowserBot, see What Is BrowserBot?.
Additional Information
To create a basic API test see, Getting Started with API Tests.
For more detail about using the Step Builder, see Using the Step Builder.
If you want to add API calls into a transaction test, see Include API Calls in a Transaction Test.
Typical Use Cases
In practice, you’d configure an API test via the ThousandEyes platform, selecting agents to run it from, defining the endpoints to hit, and setting how often it runs. Results are then viewable in detailed dashboards, showing transaction times, response codes, and even response bodies for troubleshooting. This makes it a go-to solution for proactive API monitoring at scale.
API tests are particularly useful for IT teams, network engineers, and developers who need to monitor both their own APIs and third-party dependencies. They help correlate API performance with network conditions, exposing issues that might affect user experience. For example, you might use an API test to check the health of a payment gateway or a cloud service your app relies on.
Use API Tests to:
Monitor both your own APIs and third-party dependencies
Identify and diagnose API performance degradation
Correlate API performance with network conditions
Example API Test Results
Here is the API view for a test monitoring the MBTA API:
Other Included Tests
Agent-to-server test
BGP test
Manually Configure API Tests
API Test Basic Configuration
Test Name: Give your test a descriptive name (e.g., “Payment Gateway API Check”).
Test Description: Describe what your test does.
Network Test Target: The base URL for your API call.
Target API: See Using the Step Builder
Interval: Set how often the test runs (e.g., every 5 minutes, 15 minutes). Default is 15 minutes, but adjust based on your needs.
Agents: Select agents to run the test that are configured with ThousandEyes agent software and BrowserBot. For Cloud Agents, pick from ThousandEyes’ global vantage points (e.g., London, Tokyo). For Enterprise Agents, choose agents deployed in your network. Use the “Select All” option or filter by location/network.
Alerts: Link to an alert rule (e.g., notify if availability drops below 100%) or create one via Alert Rules.
API Test Advanced Configuration
Timeout: Define the maximum time (in seconds) before the test fails (default is 30 seconds).
Target Time for View: (Optional) Specify a reference time (in milliseconds) for visualizing the performance of your API test in the ThousandEyes dashboard. It’s essentially a benchmark to helps you quickly assess whether the API’s transaction time is meeting your expectations when viewing the results.
Perform Network Measurements:
Perform bandwidth measurements: Check this box to perform bandwidth measurements. Only applies to Enterprise Agents.
Perform MTU measurements: Check this box to determine path maximum transmission unit measurements in the Path Visualization View.
Collect BGP data: Check this box to enable the BGP Path Visualization View. The BGP Public Monitors option button allows you to choose whether ThousandEyes' public BGP Monitors should be used for monitoring target prefixes. The Private BGP Monitors drop-down box allows you to select which private BGP Monitors should be used for monitoring target prefixes. By default, all public and private monitors are selected.
Protocol The protocol used when sending packets to the target.
Probing Mode: Determine how the ThousandEyes agent sends probe packets to measure network performance metrics like loss, latency, and jitter.
Path Trace Mode: Determine how to perform path tracing to map the network route from the agent to the target during a test.
Transmission Rate: Select Enforce fixed packet rate to reduce rate packets are sent to measure the network in packets per second.
No. of Path Traces: Three path trace packets are used by each agent by default to discover each hop in the Path Visualization to the target.
Proxy Option: Determines whether the test uses a proxy server to connect to the API endpoint.Choose “No Proxy,” “Agent Proxy,” or configure a test-specific proxy (static or PAC URL). For more information about proxies, see Proxy Metrics.
Last updated