Skip to main content
GET
/
unit-tests
List unit tests
curl --request GET \
  --url https://app.freyavoice.ai/api/v2/unit-tests \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "message": "<string>",
    "result": {
      "tests": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "entityId": "<string>",
          "name": "<string>",
          "expectation": "<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>"
        }
      ],
      "latestRuns": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "unitTestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "entityVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "verdictReason": "<string>",
          "completedAt": "<string>",
          "isStale": true,
          "judgeModel": "<string>"
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

workspaceId
string<uuid>
required
entityType
enum<string>
required
Available options:
agent,
workflow
entityId
string
required
Minimum string length: 1
includeArchived

Response

Unit test list with latest-run summaries

success
enum<boolean>
required
Available options:
true
data
object
required