Skip to main content
GET
/
v0
/
tests
JavaScript
import Avido from 'avido';

const client = new Avido({
  apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
  applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const testListResponse of client.tests.list({
  passRateStatuses: ['success', 'warning'],
})) {
  console.log(testListResponse.id);
}
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "applicationId": "<string>",
      "createdAt": "2024-01-05T12:34:56.789Z",
      "modifiedAt": "2024-01-05T12:34:56.789Z",
      "status": "COMPLETED",
      "evals": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "orgId": "org_123456",
          "createdAt": "2024-01-05T12:34:56.789Z",
          "modifiedAt": "2024-01-05T12:34:56.789Z",
          "status": "COMPLETED",
          "definition": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "createdAt": "2024-01-05T12:34:56.789Z",
            "modifiedAt": "2024-01-05T12:34:56.789Z",
            "type": "NATURALNESS",
            "name": "<string>",
            "globalConfig": {
              "criterion": "<string>"
            },
            "styleGuideId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "application": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "orgId": "org_123456",
              "title": "Customer Support Bot",
              "slug": "customer-support-bot",
              "description": "AI assistant for customer support inquiries",
              "context": "You are a helpful customer support assistant...",
              "language": "en",
              "type": "CHATBOT",
              "environment": "DEV",
              "createdAt": "2024-01-05T12:34:56.789Z",
              "modifiedAt": "2024-01-05T12:34:56.789Z"
            }
          },
          "results": {
            "coherence": 3,
            "engagingness": 3,
            "naturalness": 3,
            "relevance": 3,
            "clarity": 3,
            "analysis": "<string>"
          },
          "score": 0.9,
          "passed": true
        }
      ],
      "taskId": "123e4567-e89b-12d3-a456-426614174000",
      "runId": "123e4567-e89b-12d3-a456-426614174000",
      "task": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "title": "Credit Card Block",
        "topicId": "789e4567-e89b-12d3-a456-426614174000"
      },
      "runType": "MANUAL",
      "result": {
        "passed": 4503599627370495,
        "failed": 4503599627370495,
        "total": 4503599627370495,
        "passRate": 50,
        "averageScore": 0.5
      }
    }
  ],
  "pagination": {
    "skip": 0,
    "limit": 25,
    "total": 100,
    "totalPages": 4,
    "totalCount": 100
  }
}

Authorizations

x-api-key
string
header
required

Your unique Avido API key

x-application-id
string
header
required

Your unique Avido Application ID

Query Parameters

skip
integer
default:0

Number of items to skip before starting to collect the result set.

Required range: 0 <= x <= 9007199254740991
Example:

0

limit
integer

Number of items to include in the result set.

Required range: 1 <= x <= 100
Example:

25

orderBy
string
default:createdAt

Field to order by in the result set.

Example:

"createdAt"

orderDir
enum<string>
default:desc

Order direction.

Available options:
asc,
desc
Example:

"desc"

status
enum<string>[]

Filter by test status (e.g. COMPLETED, FAILED)

Status of the evaluation/test

Available options:
PENDING,
IN_PROGRESS,
COMPLETED,
FAILED
Example:
["COMPLETED", "FAILED"]
startDate
string<date-time>

Filter eval runs after this date (inclusive).

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-01-01T00:00:00.000Z"

endDate
string<date-time>

Filter eval runs before this date (inclusive).

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2024-12-31T23:59:59.999Z"

passRateStatuses
enum<string>[]
required

Filter by pass rate status badges (success: >75%, warning: 51-75%, error: ≤50%)

Available options:
success,
warning,
error
Example:
["success", "warning"]
evalDefinitionId
string<uuid>[]

Filter tests by eval definition ID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"123e4567-e89b-12d3-a456-426614174000"

experimentVariantId
string<uuid>[]

Filter tests by experiment variant ID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"123e4567-e89b-12d3-a456-426614174000"

runType
enum<string>[]

Filter tests by run type (MANUAL, SCHEDULED, EXPERIMENT)

Available options:
MANUAL,
SCHEDULED,
EXPERIMENT,
MONITORING
Example:
["MANUAL", "SCHEDULED"]
taskId
string<uuid>[]

Filter tests by task ID

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:
["123e4567-e89b-12d3-a456-426614174000"]
tagId
string[]

Filter tests by the associated task's tag IDs. Use 'none' to filter for tests with untagged tasks.

Maximum array length: 100
Example:
["123e4567-e89b-12d3-a456-426614174000"]

Response

Successfully retrieved evaluations

Paginated response containing tests

data
object[]
required
pagination
PaginationResponse · object
required

Pagination metadata returned in a paginated response.