Get assistant test by ID
Retrieves detailed information about a specific assistant test
GET
/
ai
/
assistants
/
tests
/
{test_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const assistantTest = await client.ai.assistants.tests.retrieve('test_id');
console.log(assistantTest.test_id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
assistant_test = client.ai.assistants.tests.retrieve(
"test_id",
)
print(assistant_test.test_id)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
assistantTest, err := client.AI.Assistants.Tests.Get(context.TODO(), "test_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", assistantTest.TestID)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.assistants.tests.AssistantTest;
import com.telnyx.sdk.models.ai.assistants.tests.TestRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AssistantTest assistantTest = client.ai().assistants().tests().retrieve("test_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
assistant_test = telnyx.ai.assistants.tests.retrieve("test_id")
puts(assistant_test)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$assistantTest = $client->ai->assistants->tests->retrieve('test_id');
var_dump($assistantTest);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:tests retrieve \
--api-key 'My API Key' \
--test-id test_idcurl --request GET \
--url https://api.telnyx.com/v2/ai/assistants/tests/{test_id} \
--header 'Authorization: Bearer <token>'{
"test_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Bot Test",
"telnyx_conversation_channel": "web_chat",
"rubric": [
{
"criteria": "Responds within 30 seconds",
"name": "Response Time"
}
],
"created_at": "2024-01-16T09:00:00Z",
"description": "<string>",
"destination": "<string>",
"max_duration_seconds": 123,
"test_suite": "<string>",
"instructions": "<string>"
}{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}Authorizations
Response
Returns complete test configuration including rubric, schedule, and metadata
Response model containing complete assistant test information.
Returns all test configuration details including evaluation criteria, scheduling, and metadata. Used when retrieving individual tests or after creating/updating tests.
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const assistantTest = await client.ai.assistants.tests.retrieve('test_id');
console.log(assistantTest.test_id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
assistant_test = client.ai.assistants.tests.retrieve(
"test_id",
)
print(assistant_test.test_id)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
assistantTest, err := client.AI.Assistants.Tests.Get(context.TODO(), "test_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", assistantTest.TestID)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.assistants.tests.AssistantTest;
import com.telnyx.sdk.models.ai.assistants.tests.TestRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AssistantTest assistantTest = client.ai().assistants().tests().retrieve("test_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
assistant_test = telnyx.ai.assistants.tests.retrieve("test_id")
puts(assistant_test)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$assistantTest = $client->ai->assistants->tests->retrieve('test_id');
var_dump($assistantTest);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:tests retrieve \
--api-key 'My API Key' \
--test-id test_idcurl --request GET \
--url https://api.telnyx.com/v2/ai/assistants/tests/{test_id} \
--header 'Authorization: Bearer <token>'{
"test_id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Support Bot Test",
"telnyx_conversation_channel": "web_chat",
"rubric": [
{
"criteria": "Responds within 30 seconds",
"name": "Response Time"
}
],
"created_at": "2024-01-16T09:00:00Z",
"description": "<string>",
"destination": "<string>",
"max_duration_seconds": 123,
"test_suite": "<string>",
"instructions": "<string>"
}{
"detail": [
{
"loc": [
"body",
"name"
],
"msg": "Field required",
"type": "missing"
}
]
}