Retrieve an evaluator scenario
Returns the specified evaluator scenario with full detail.
GET
/
ai
/
tests
/
test_framework
/
v1
/
scenarios
/
{id}
Retrieve an evaluator scenario
curl --request GET \
--url https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}', 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.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}",
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: Bearer <token>"
],
]);
$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.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 9512,
"name": "Refund escalation flow",
"agent": 1259,
"project": null,
"personality": 4643,
"personality_name": "Interruptive (High)",
"tags": [
"support",
"regression"
],
"tool_ids": [],
"runs": [],
"metrics": [
266881,
266882
],
"metric_names": [
"AI interrupting user",
"Average Pitch (in Hz)"
],
"phone_number": "+13125550188",
"outbound_phone_number_data": null,
"first_message": "Hi, I want a refund.",
"inbound_phone_number": null,
"inbound_phone_number_data": null,
"instructions": "Call the support line and demand a refund for a damaged product.",
"simulation_description": "Simulates an impatient customer demanding a refund.",
"information_fields": null,
"expected_outcome_prompt": "The assistant explains the refund policy and offers escalation.",
"scenario_language": "en",
"scenario_type": "workflow",
"suite_type": "predefined",
"is_predefined": false,
"test_profile": null,
"test_profile_data": null,
"dynamic_variable_values": null,
"folder_path": null,
"max_duration": null
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The AI Tests service rejected the request."
}
]
}{
"errors": [
{
"code": "10003",
"title": "Unauthorized",
"detail": "The API key is missing or invalid."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Not Found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10018",
"title": "Unprocessable Entity",
"detail": "Validation failed for the request payload."
}
]
}{
"errors": [
{
"code": "10029",
"title": "Too Many Requests",
"detail": "Too many requests; retry later."
}
]
}{
"errors": [
{
"code": "10063",
"title": "Service Unavailable",
"detail": "The test framework service is temporarily unavailable."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Numeric ID of the evaluator scenario.
Response
Evaluator scenario detail.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
Retrieve an evaluator scenario
curl --request GET \
--url https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}', 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.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}",
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: Bearer <token>"
],
]);
$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.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 9512,
"name": "Refund escalation flow",
"agent": 1259,
"project": null,
"personality": 4643,
"personality_name": "Interruptive (High)",
"tags": [
"support",
"regression"
],
"tool_ids": [],
"runs": [],
"metrics": [
266881,
266882
],
"metric_names": [
"AI interrupting user",
"Average Pitch (in Hz)"
],
"phone_number": "+13125550188",
"outbound_phone_number_data": null,
"first_message": "Hi, I want a refund.",
"inbound_phone_number": null,
"inbound_phone_number_data": null,
"instructions": "Call the support line and demand a refund for a damaged product.",
"simulation_description": "Simulates an impatient customer demanding a refund.",
"information_fields": null,
"expected_outcome_prompt": "The assistant explains the refund policy and offers escalation.",
"scenario_language": "en",
"scenario_type": "workflow",
"suite_type": "predefined",
"is_predefined": false,
"test_profile": null,
"test_profile_data": null,
"dynamic_variable_values": null,
"folder_path": null,
"max_duration": null
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The AI Tests service rejected the request."
}
]
}{
"errors": [
{
"code": "10003",
"title": "Unauthorized",
"detail": "The API key is missing or invalid."
}
]
}{
"errors": [
{
"code": "10005",
"title": "Not Found",
"detail": "The requested resource or URL could not be found."
}
]
}{
"errors": [
{
"code": "10018",
"title": "Unprocessable Entity",
"detail": "Validation failed for the request payload."
}
]
}{
"errors": [
{
"code": "10029",
"title": "Too Many Requests",
"detail": "Too many requests; retry later."
}
]
}{
"errors": [
{
"code": "10063",
"title": "Service Unavailable",
"detail": "The test framework service is temporarily unavailable."
}
]
}