Reading the API Test Views
Last updated
Last updated
API tests require Views 2.0. See Getting Started With Views for a basic description of ThousandEyes test views.
Go to Cloud & Enterprise Agents > Views and search in the top bar for your API test by name. The initial view loads with the metric API transaction time pre-selected.
The tabs below the timeline are similar to those for other test types, except for the Details tab which is unique to the API test type. Note also that the Network layer view shows proxy details, as another node. See Getting Started with Path Visualization for more information on network views and nodes.
The top timeline shows a graph for the selected Metric. View metrics for the API test type are:
API transaction time - timeline shows a breakout of the total time taken by all of the API calls that run sequentially in an API test, averaged across each agent. If total time is slower than normal, you should see a spike in the API Transaction time.
API completion - a percentage value indicating the number of API calls that succeeded in the selected test round. The API completion metric is helpful for understanding whether the API is performing as expected.
More precisely, API completion is calculated as the number of API steps (API calls) that received a response and did not fail any assertions, divided by the total number of API steps in the test. This number is then averaged across each agent. For example:
In a 1-step test, API completion will be either 100% (one out of one steps) or 0% (zero out of one steps).
In a 2-step API test, API Completion is either 100% (2 out of 2 steps), 50% (1 out of 2 steps), or 0% (0 out of 2 steps).
The ratios adjust accordingly for the number of steps in the test.
The API test view Details tab lists all the API calls in the test, along with transaction times. Note that this tab shows times for a single test round, as selected in the timeline above.
Clicking a step displays the request and response details for the test round selected in the timeline above.
When you click a step in the view’s Details tab, a modal appears with further details including the response code for that API call, the time it took for the API call to complete, and a summary of results for assertion rules, if any custom rules were configured. Both request and response will have headers and, sometimes, body as well.
Note that Body only displays if the check box for Collect Response from this API Step was selected in the Post-Request Options tab for this step.
The following must be true:
The HTTP response contains a Content-Type header that is supported, and
The Collect Response from this API Step is selected in the Post-Request Options tab
If either of those are not true, then the response body contents do not display in the test view.
Although the API test type has many features in common with the browser synthetics test types, namely page load and transaction tests, the API test itself is not considered “browser synthetics” as it doesn’t use a browser. However, regarding the test views, there are some analogues worth mentioning.
Line by line: The Details tab on the API test view is the equivalent of the Waterfall tab on the transaction and page load test views. Each API step corresponds to a line on the waterfall, both representing a single HTTP request/response.
Drilling down: Expanding a step in the API Details tab is the equivalent of clicking the [headers]
link in the waterfall.
System state indicators: The API view additionally includes the response body. The equivalent for the transaction test views would be a screenshot, both from screenshot markers in the transaction test script, and the screenshot that’s taken if the test errors out prematurely. In any case, the API response body and the transaction test screenshot show the state of the system at the time that the API call (or scripted event) occurred.
ThousandEyes only supports text-formatted responses to display on the Body portion of the API test view detail modal. Other formats such as media files can’t be coherently displayed in a text editor. If Collect Response from this API Step is checked in the Step Builder, but the test view details modal still doesn't show the response body, that means that the response body included an unsupported format.