> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# Wyświetl testy odpowiedzi agenta

GET https://api.elevenlabs.io/v1/convai/agent-testing

Wyświetla wszystkie testy odpowiedzi agenta z obsługą paginacji i opcjonalnym filtrowaniem wyszukiwania.

Reference: https://elevenlabs.io/docs/api-reference/tests/list

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Query parameters

- `cursor` (string, optional, nullable) — Służy do pobrania następnej strony. Kursor jest zwracany w odpowiedzi.
- `page_size` (integer, optional, default: 30) — Maksymalna liczba testów do zwrócenia. Nie może przekraczać 100, domyślnie 30.
- `search` (string, optional, nullable) — Zapytanie wyszukiwania do filtrowania testów i folderów według nazwy.
- `parent_folder_id` (string, optional, nullable) — Filtruj według ID folderu nadrzędnego. Użyj „root”, aby pobrać elementy z folderu głównego.
- `types` (list of enum, optional, nullable) — Jeśli podano, endpoint zwróci tylko testy/foldery danych typów.
  - Allowed values: `llm`, `tool`, `simulation`, `folder`
- `include_folders` (boolean, optional, nullable, deprecated) — Wycofane. Zamiast tego użyj parametru zapytania `types` i uwzględnij `folder`.
- `sort_mode` (enum, optional, default: default) — Tryb sortowania listy testów. Użyj „folders_first”, aby umieścić foldery przed testami.
  - Allowed values: `default`, `folders_first`
- `sharing_mode` (enum, optional) — Filtruj widoczność testów. Użyj `shared_with_me`, aby zwrócić tylko testy i foldery udostępnione obecnemu użytkownikowi, których nie utworzył.
  - Allowed values: `all`, `shared_with_me`
- `created_by_user_id` (string, optional, nullable) — Filtruj testy i foldery według identyfikatora użytkownika, który je utworzył. Użyj „@me”, aby wskazać uwierzytelnionego użytkownika.

## Response

### 200

Pomyślna odpowiedź

- `tests` (list of UnitTestSummaryResponseModel, required)
- `has_more` (boolean, required)
- `next_cursor` (string, optional, nullable)

## Errors

### 422 Unprocessable Entity Error

Błąd walidacji

- `detail` (list of ValidationError, optional)

## Types

### UnitTestSummaryResponseModel

- `id` (string, required) — ID testu
- `name` (string, required) — Nazwa testu
- `created_at_unix_secs` (integer, required) — Czas utworzenia testu w sekundach Unix
- `last_updated_at_unix_secs` (integer, required) — Czas ostatniej aktualizacji testu w sekundach Unix
- `type` (enum, required) — Typ testu lub obiektu
  - Allowed values: `llm`, `tool`, `simulation`, `folder`
- `access_info` (ResourceAccessInfo, optional, nullable) — Informacje o dostępie do testu
- `entity_type` (enum, optional, default: test) — Typ encji (test lub folder)
  - Allowed values: `test`, `folder`
- `folder_parent_id` (string, optional, nullable) — ID folderu nadrzędnego
- `folder_path` (list of AgentTestFolderPathSegmentResponseModel, optional) — Segmenty ścieżki folderów od katalogu głównego do tego elementu
- `children_count` (integer, optional, nullable) — Liczba bezpośrednich elementów podrzędnych (testów i podfolderów), tylko dla folderów
- `conversation_initiation_source` (enum, optional, nullable, default: unknown) — Kanał, w którym test symuluje rozmowę. Null dla folderów lub domyślnego zachowania.
  - Allowed values: `unknown`, `android_sdk`, `node_js_sdk`, `react_native_sdk`, `react_sdk`, `js_sdk`, `python_sdk`, `widget`, `sip_trunk`, `twilio`, `exotel`, `genesys`, `avaya`, `audiocodes`, `swift_sdk`, `whatsapp`, `twilio_sms`, `flutter_sdk`, `zendesk_integration`, `slack_integration`, `telegram_integration`, `intercom_integration`, `freshdesk_integration`, `salesforce_integration`, `template_preview`, `genesys_bot_connector`, `subagent_tool`

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ResourceAccessInfo

- `is_creator` (boolean, required) — Czy użytkownik wysyłający żądanie jest twórcą agenta
- `creator_name` (string, required) — Nazwa twórcy agenta
- `creator_email` (string, required) — E-mail twórcy agenta
- `role` (enum, required) — Rola użytkownika wysyłającego żądanie
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — Poziom dostępu dla anonimowych użytkowników. Jeśli None, zasób nie jest publicznie udostępniany.
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — Dlaczego użytkownik wysyłający żądanie ma dostęp do tego zasobu. 'creator' = wywołujący jest właścicielem. 'explicit' = wywołujący (lub jedna z jego grup workspace) jest wymieniony w role_to_group_ids poza ogólną grupą everyone dla workspace. 'workspace_default' = ogólna grupa everyone dla workspace jest wymieniona w role_to_group_ids (ten zasób widzi każdy nieanonimowy członek workspace, w tym administratorzy). 'workspace_admin' = wywołujący jest administratorem workspace, a uprawnienia administratora są *jedyną* ścieżką dostępu; zarezerwowane dla dokumentów, których nikt inny nie może zobaczyć. Pozwala interfejsowi wyjaśnić, dlaczego użytkownik omijający ograniczenia jako administrator widzi dokument, który nie został mu wyraźnie udostępniony.
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### AgentTestFolderPathSegmentResponseModel

- `id` (string, required)
- `name` (string, optional, default: )

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "tests": [
    {
      "id": "string",
      "name": "string",
      "created_at_unix_secs": 1,
      "last_updated_at_unix_secs": 1,
      "type": "llm",
      "access_info": {
        "is_creator": true,
        "creator_name": "John Doe",
        "creator_email": "john.doe@example.com",
        "role": "admin",
        "access_source": "creator"
      },
      "entity_type": "test",
      "folder_parent_id": "string",
      "folder_path": [
        {
          "id": "string",
          "name": ""
        }
      ],
      "children_count": 1,
      "conversation_initiation_source": "unknown"
    }
  ],
  "has_more": true,
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/agent-testing"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/agent-testing';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/convai/agent-testing"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/convai/agent-testing")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/convai/agent-testing")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/agent-testing');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/agent-testing");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/convai/agent-testing")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```