Get Enhanced Analytics
curl --request GET \
--url https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total_runs": 124,
"passed": 98,
"failed": 26,
"pass_rate": 0.7903,
"avg_score": 0.82,
"health_score": 0.76,
"reliability_score": 0.85,
"trend": {
"weekly": "improving",
"daily_pass_rates": [
{ "date": "2026-04-12", "rate": 0.75, "count": 8 },
{ "date": "2026-04-13", "rate": 0.88, "count": 16 },
{ "date": "2026-04-14", "rate": 0.90, "count": 10 }
]
},
"node_failure_heatmap": [
{
"node_id": "node_8f3a2b1c",
"node_name": "Escalation Handler",
"failure_count": 14,
"total_traversals": 38,
"failure_rate": 0.3684
},
{
"node_id": "node_4d7e9f0a",
"node_name": "Appointment Booking",
"failure_count": 8,
"total_traversals": 72,
"failure_rate": 0.1111
},
{
"node_id": "node_1a2b3c4d",
"node_name": "Greeting",
"failure_count": 2,
"total_traversals": 124,
"failure_rate": 0.0161
},
{
"node_id": "node_5e6f7a8b",
"node_name": "Collect Info",
"failure_count": 2,
"total_traversals": 110,
"failure_rate": 0.0182
}
],
"weakest_link": {
"node_id": "node_8f3a2b1c",
"node_name": "Escalation Handler",
"failure_rate": 0.3684
},
"sankey_data": {
"nodes": [
{ "id": "node_1a2b3c4d", "name": "Greeting", "type": "Default", "category": "start" },
{ "id": "node_5e6f7a8b", "name": "Collect Info", "type": "Default", "category": "middle" },
{ "id": "node_4d7e9f0a", "name": "Appointment Booking", "type": "Default", "category": "middle" },
{ "id": "node_8f3a2b1c", "name": "Escalation Handler", "type": "Transfer", "category": "middle" },
{ "id": "node_9c0d1e2f", "name": "Confirmation", "type": "Default", "category": "middle" },
{ "id": "node_end_001", "name": "End Call", "type": "End Call", "category": "end" }
],
"links": [
{ "source": "node_1a2b3c4d", "target": "node_5e6f7a8b", "value": 110, "pass_count": 96, "fail_count": 14 },
{ "source": "node_5e6f7a8b", "target": "node_4d7e9f0a", "value": 72, "pass_count": 64, "fail_count": 8 },
{ "source": "node_5e6f7a8b", "target": "node_8f3a2b1c", "value": 38, "pass_count": 24, "fail_count": 14 },
{ "source": "node_4d7e9f0a", "target": "node_9c0d1e2f", "value": 64, "pass_count": 64, "fail_count": 0 },
{ "source": "node_9c0d1e2f", "target": "node_end_001", "value": 64, "pass_count": 64, "fail_count": 0 },
{ "source": "node_8f3a2b1c", "target": "node_end_001", "value": 24, "pass_count": 24, "fail_count": 0 }
]
}
}
Agent Testing
Get Enhanced Analytics
Get enhanced testing analytics including node failure heatmap, weakest link, trend analysis, and Sankey flow data.
GET
/
v1
/
agent-testing
/
analytics
/
{pathwayId}
/
enhanced
Get Enhanced Analytics
curl --request GET \
--url https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/agent-testing/analytics/{pathwayId}/enhanced")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total_runs": 124,
"passed": 98,
"failed": 26,
"pass_rate": 0.7903,
"avg_score": 0.82,
"health_score": 0.76,
"reliability_score": 0.85,
"trend": {
"weekly": "improving",
"daily_pass_rates": [
{ "date": "2026-04-12", "rate": 0.75, "count": 8 },
{ "date": "2026-04-13", "rate": 0.88, "count": 16 },
{ "date": "2026-04-14", "rate": 0.90, "count": 10 }
]
},
"node_failure_heatmap": [
{
"node_id": "node_8f3a2b1c",
"node_name": "Escalation Handler",
"failure_count": 14,
"total_traversals": 38,
"failure_rate": 0.3684
},
{
"node_id": "node_4d7e9f0a",
"node_name": "Appointment Booking",
"failure_count": 8,
"total_traversals": 72,
"failure_rate": 0.1111
},
{
"node_id": "node_1a2b3c4d",
"node_name": "Greeting",
"failure_count": 2,
"total_traversals": 124,
"failure_rate": 0.0161
},
{
"node_id": "node_5e6f7a8b",
"node_name": "Collect Info",
"failure_count": 2,
"total_traversals": 110,
"failure_rate": 0.0182
}
],
"weakest_link": {
"node_id": "node_8f3a2b1c",
"node_name": "Escalation Handler",
"failure_rate": 0.3684
},
"sankey_data": {
"nodes": [
{ "id": "node_1a2b3c4d", "name": "Greeting", "type": "Default", "category": "start" },
{ "id": "node_5e6f7a8b", "name": "Collect Info", "type": "Default", "category": "middle" },
{ "id": "node_4d7e9f0a", "name": "Appointment Booking", "type": "Default", "category": "middle" },
{ "id": "node_8f3a2b1c", "name": "Escalation Handler", "type": "Transfer", "category": "middle" },
{ "id": "node_9c0d1e2f", "name": "Confirmation", "type": "Default", "category": "middle" },
{ "id": "node_end_001", "name": "End Call", "type": "End Call", "category": "end" }
],
"links": [
{ "source": "node_1a2b3c4d", "target": "node_5e6f7a8b", "value": 110, "pass_count": 96, "fail_count": 14 },
{ "source": "node_5e6f7a8b", "target": "node_4d7e9f0a", "value": 72, "pass_count": 64, "fail_count": 8 },
{ "source": "node_5e6f7a8b", "target": "node_8f3a2b1c", "value": 38, "pass_count": 24, "fail_count": 14 },
{ "source": "node_4d7e9f0a", "target": "node_9c0d1e2f", "value": 64, "pass_count": 64, "fail_count": 0 },
{ "source": "node_9c0d1e2f", "target": "node_end_001", "value": 64, "pass_count": 64, "fail_count": 0 },
{ "source": "node_8f3a2b1c", "target": "node_end_001", "value": 24, "pass_count": 24, "fail_count": 0 }
]
}
}
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The pathway ID.
Query Parameters
integer
default:"30"
Number of days to look back. Maximum value is 365.
Response
integer
Total number of test runs in the time window.
integer
Number of test runs that passed.
integer
Number of test runs that failed.
number
Pass rate as a decimal from 0 to 1.
number
Average score across all runs, from 0 to 1.
number
Overall health score for the pathway, from 0 to 1. Combines pass rate, trend direction, and reliability.
number
Reliability score measuring consistency of results over time, from 0 to 1.
object
array
Failure data per node for building a heatmap visualization.
object
object
Flow data for building a Sankey diagram of test run traversals.
Show sankey data object
Show sankey data object
array
{
"total_runs": 124,
"passed": 98,
"failed": 26,
"pass_rate": 0.7903,
"avg_score": 0.82,
"health_score": 0.76,
"reliability_score": 0.85,
"trend": {
"weekly": "improving",
"daily_pass_rates": [
{ "date": "2026-04-12", "rate": 0.75, "count": 8 },
{ "date": "2026-04-13", "rate": 0.88, "count": 16 },
{ "date": "2026-04-14", "rate": 0.90, "count": 10 }
]
},
"node_failure_heatmap": [
{
"node_id": "node_8f3a2b1c",
"node_name": "Escalation Handler",
"failure_count": 14,
"total_traversals": 38,
"failure_rate": 0.3684
},
{
"node_id": "node_4d7e9f0a",
"node_name": "Appointment Booking",
"failure_count": 8,
"total_traversals": 72,
"failure_rate": 0.1111
},
{
"node_id": "node_1a2b3c4d",
"node_name": "Greeting",
"failure_count": 2,
"total_traversals": 124,
"failure_rate": 0.0161
},
{
"node_id": "node_5e6f7a8b",
"node_name": "Collect Info",
"failure_count": 2,
"total_traversals": 110,
"failure_rate": 0.0182
}
],
"weakest_link": {
"node_id": "node_8f3a2b1c",
"node_name": "Escalation Handler",
"failure_rate": 0.3684
},
"sankey_data": {
"nodes": [
{ "id": "node_1a2b3c4d", "name": "Greeting", "type": "Default", "category": "start" },
{ "id": "node_5e6f7a8b", "name": "Collect Info", "type": "Default", "category": "middle" },
{ "id": "node_4d7e9f0a", "name": "Appointment Booking", "type": "Default", "category": "middle" },
{ "id": "node_8f3a2b1c", "name": "Escalation Handler", "type": "Transfer", "category": "middle" },
{ "id": "node_9c0d1e2f", "name": "Confirmation", "type": "Default", "category": "middle" },
{ "id": "node_end_001", "name": "End Call", "type": "End Call", "category": "end" }
],
"links": [
{ "source": "node_1a2b3c4d", "target": "node_5e6f7a8b", "value": 110, "pass_count": 96, "fail_count": 14 },
{ "source": "node_5e6f7a8b", "target": "node_4d7e9f0a", "value": 72, "pass_count": 64, "fail_count": 8 },
{ "source": "node_5e6f7a8b", "target": "node_8f3a2b1c", "value": 38, "pass_count": 24, "fail_count": 14 },
{ "source": "node_4d7e9f0a", "target": "node_9c0d1e2f", "value": 64, "pass_count": 64, "fail_count": 0 },
{ "source": "node_9c0d1e2f", "target": "node_end_001", "value": 64, "pass_count": 64, "fail_count": 0 },
{ "source": "node_8f3a2b1c", "target": "node_end_001", "value": 24, "pass_count": 24, "fail_count": 0 }
]
}
}
Docs for agents: llms.txt
Was this page helpful?
⌘I