> 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.

# Elenca test di risposta dell'agente

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

Elenca tutti i test delle risposte dell'agente con supporto per la paginazione e filtro di ricerca facoltativo.

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) — Usato per recuperare la pagina successiva. Il cursore viene restituito nella risposta.
- `page_size` (integer, optional, default: 30) — Numero massimo di test da restituire. Non può superare 100; il valore predefinito è 30.
- `search` (string, optional, nullable) — Query di ricerca per filtrare test e cartelle in base al nome.
- `parent_folder_id` (string, optional, nullable) — Filtra in base all'ID della cartella padre. Usa 'root' per ottenere gli elementi nella cartella radice.
- `types` (list of enum, optional, nullable) — Se presente, l'endpoint restituirà solo test/cartelle dei tipi specificati.
  - Allowed values: `llm`, `tool`, `simulation`, `folder`
- `include_folders` (boolean, optional, nullable, deprecated) — Deprecato. Usa invece il parametro query `types` e includi `folder`.
- `sort_mode` (enum, optional, default: default) — Modalità di ordinamento per l'elenco dei test. Usa 'folders_first' per posizionare le cartelle prima dei test.
  - Allowed values: `default`, `folders_first`
- `sharing_mode` (enum, optional) — Filtra la visibilità dei test. Usa `shared_with_me` per restituire solo i test/le cartelle condivisi con l'utente corrente che non ha creato.
  - Allowed values: `all`, `shared_with_me`

## Response

### 200

Risposta riuscita

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

## Errors

### 422 Unprocessable Entity Error

Errore di convalida

- `detail` (list of ValidationError, optional)

## Types

### UnitTestSummaryResponseModel

- `id` (string, required) — L'ID del test
- `name` (string, required) — Nome del test
- `created_at_unix_secs` (integer, required) — Ora di creazione del test in secondi Unix
- `last_updated_at_unix_secs` (integer, required) — Data e ora dell'ultimo aggiornamento del test in secondi Unix
- `type` (enum, required) — Tipo del test o dell'entità
  - Allowed values: `llm`, `tool`, `simulation`, `folder`
- `access_info` (ResourceAccessInfo, optional, nullable) — Le informazioni di accesso del test
- `entity_type` (enum, optional, default: test) — Il tipo di entità (test o cartella)
  - Allowed values: `test`, `folder`
- `folder_parent_id` (string, optional, nullable) — L'ID della cartella principale
- `folder_path` (list of AgentTestFolderPathSegmentResponseModel, optional) — I segmenti del path della cartella dalla root a questa entità
- `children_count` (integer, optional, nullable) — Numero di elementi figli diretti, test e sottocartelle, solo per le cartelle
- `conversation_initiation_source` (enum, optional, nullable, default: unknown) — Canale con cui il test simula la conversazione. Null per le cartelle o per il comportamento predefinito.
  - 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) — Se l'utente che effettua la richiesta è il creatore dell'agente
- `creator_name` (string, required) — Nome del creatore dell'agente
- `creator_email` (string, required) — Email del creatore dell'agente
- `role` (enum, required) — Il ruolo dell'utente che effettua la richiesta
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — Il livello di accesso per gli utenti anonimi. Se è None, la risorsa non è condivisa pubblicamente.
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — Motivo per cui l'utente richiedente ha accesso a questa risorsa. 'creator' = il chiamante è il proprietario. 'explicit' = il chiamante, o uno dei suoi gruppi del workspace, è elencato in role_to_group_ids oltre al gruppo everyone dell'intero workspace. 'workspace_default' = il gruppo everyone dell'intero workspace è elencato in role_to_group_ids (ogni membro non anonimo del workspace, inclusi gli amministratori, vede questa risorsa). 'workspace_admin' = il chiamante è un amministratore del workspace e il ruolo di amministratore è l'*unica* modalità di accesso; riservato ai documenti che nessun altro può vedere. Consente all'interfaccia di indicare perché un visualizzatore con bypass da amministratore vede un documento che non è stato condiviso esplicitamente con lui.
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### AgentTestFolderPathSegmentResponseModel

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

### ValidationErrorLocItems

## 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()
```