---
title: "List A/B test variants"
method: GET
path: "/v1/projects/{project_id}/ab-tests/variants"
tags: ["ab-tests"]
---

# List A/B test variants

`GET /v1/projects/{project_id}/ab-tests/variants`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/ab-tests/variants`
- Auth: HTTP bearer

List the test variants of an agent in the environment's active deployment.

A variant is an agent named `<agent_name>-test-<variant>`. Pass the variant
name as `test_name` when creating a test.

Required permission: `ab_tests.view`.

## Path parameters

- `project_id` string, uuid, required

## Query parameters

- `environment_id` string, uuid, required: Environment whose active deployment to read.
- `agent_name` string, required: Base agent to list variants for.

## Response `200`

Successful Response

- PublicABTestVariantsResponse
  - `variants` string[], required: Variants in the environment's active deployment, from agent names of the form `<agent>-test-<variant>`.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

[API](https://skmtc.dev/connic/apis/connic-api.md) · [All operations](https://skmtc.dev/connic/apis/connic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/connic/apis/connic-api/revisions/482932da5fbe?raw)
