Unit tests overview
curl --request GET \
--url https://app.freyavoice.ai/api/v2/unit-tests/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.freyavoice.ai/api/v2/unit-tests/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.freyavoice.ai/api/v2/unit-tests/overview', 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://app.freyavoice.ai/api/v2/unit-tests/overview",
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://app.freyavoice.ai/api/v2/unit-tests/overview"
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://app.freyavoice.ai/api/v2/unit-tests/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.freyavoice.ai/api/v2/unit-tests/overview")
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{
"success": true,
"data": {
"message": "<string>",
"result": {
"entities": [
{
"entityId": "<string>",
"entityName": "<string>",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"headVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"headVersionNumber": 123,
"tests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "<string>",
"name": "<string>",
"expectation": "<string>",
"assertions": [
{
"type": "routing",
"target": "<string>",
"signal": "node_entered",
"negate": false
}
],
"tags": [
"<string>"
],
"input": {
"schemaVersion": 1,
"messages": [
{
"role": "<string>",
"message": "<string>",
"content": "<string>",
"messageId": "<string>",
"nodeId": "<string>",
"secondsFromStart": 123,
"duration": 123,
"timestamp": "<string>",
"endTime": 123,
"wasBlocked": true,
"was_blocked": true,
"blockedContent": "<string>",
"blocked_content": "<string>",
"workflowSnapshot": "<unknown>"
}
],
"customerVariables": {},
"authoredAgainstVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"seedCallId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seedMessageId": "<string>",
"ordinal": 123,
"isArchived": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"judgeContext": {
"includeRoutingEvents": true,
"includeExtractionEvents": true,
"includeToolCalls": true,
"includeOtherEvents": true
}
}
]
}
],
"aggregates": [
{
"unitTestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passCount": 1,
"failCount": 1,
"errorCount": 1,
"runningCount": 1,
"latestRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latestVerdictReason": "<string>",
"latestCompletedAt": "<string>",
"latestJudgeModel": "<string>"
}
]
}
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}Unit Tests
Unit tests overview
Returns every non-archived unit test in the workspace grouped by entity, with each test’s latest run aggregated against its entity’s mainline head version. Requires agents:read or workflows:read.
GET
/
unit-tests
/
overview
Unit tests overview
curl --request GET \
--url https://app.freyavoice.ai/api/v2/unit-tests/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.freyavoice.ai/api/v2/unit-tests/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.freyavoice.ai/api/v2/unit-tests/overview', 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://app.freyavoice.ai/api/v2/unit-tests/overview",
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://app.freyavoice.ai/api/v2/unit-tests/overview"
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://app.freyavoice.ai/api/v2/unit-tests/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.freyavoice.ai/api/v2/unit-tests/overview")
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{
"success": true,
"data": {
"message": "<string>",
"result": {
"entities": [
{
"entityId": "<string>",
"entityName": "<string>",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"headVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"headVersionNumber": 123,
"tests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityId": "<string>",
"name": "<string>",
"expectation": "<string>",
"assertions": [
{
"type": "routing",
"target": "<string>",
"signal": "node_entered",
"negate": false
}
],
"tags": [
"<string>"
],
"input": {
"schemaVersion": 1,
"messages": [
{
"role": "<string>",
"message": "<string>",
"content": "<string>",
"messageId": "<string>",
"nodeId": "<string>",
"secondsFromStart": 123,
"duration": 123,
"timestamp": "<string>",
"endTime": 123,
"wasBlocked": true,
"was_blocked": true,
"blockedContent": "<string>",
"blocked_content": "<string>",
"workflowSnapshot": "<unknown>"
}
],
"customerVariables": {},
"authoredAgainstVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"seedCallId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"seedMessageId": "<string>",
"ordinal": 123,
"isArchived": true,
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "<string>",
"updatedAt": "<string>",
"judgeContext": {
"includeRoutingEvents": true,
"includeExtractionEvents": true,
"includeToolCalls": true,
"includeOtherEvents": true
}
}
]
}
],
"aggregates": [
{
"unitTestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"entityVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passCount": 1,
"failCount": 1,
"errorCount": 1,
"runningCount": 1,
"latestRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latestVerdictReason": "<string>",
"latestCompletedAt": "<string>",
"latestJudgeModel": "<string>"
}
]
}
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}{
"success": false,
"data": {
"message": "<string>",
"result": "<unknown>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
⌘I