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

# テスト呼び出しを一覧表示

GET https://api.elevenlabs.io/v1/convai/test-invocations

すべてのテスト呼び出しを、ページネーションと任意の検索フィルタリング付きで一覧表示します。

Reference: https://elevenlabs.io/docs/api-reference/tests/test-invocations/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

- `agent_id` (string, optional, nullable) — エージェントIDでフィルター
- `branch_id` (string, optional, nullable) — ブランチIDでフィルター
- `test_id` (string, optional, nullable) — このテストIDの実行を含む呼び出しにフィルタリング
- `start_time` (integer, optional, nullable) — created_atの下限値（Unix秒、境界値を含む）
- `end_time` (integer, optional, nullable) — created_atの上限値（Unix秒、境界値を含む）
- `version_id` (string, optional, nullable) — テストを実行したエージェントのバージョンでフィルタリング
- `page_size` (integer, optional, default: 30) — 返すテストの最大数です。100を超えることはできず、デフォルトは30です。
- `search` (string, optional, nullable) — テストとフォルダーを名前で絞り込む検索クエリです。
- `cursor` (string, optional, nullable) — 次のページを取得するために使用します。カーソルはレスポンスで返されます。

## Response

### 200

成功レスポンス。

- `results` (list of TestInvocationSummaryResponseModel, required)
- `has_more` (boolean, required) — 利用可能な結果がさらにあるかどうか
- `meta` (ListResponseMeta, optional)
- `next_cursor` (string, optional, nullable) — 結果の次のページを取得するためのカーソル

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### TestInvocationSummaryResponseModel

- `id` (string, required) — テスト呼び出しのID
- `created_at_unix_secs` (integer, required) — Unix秒でのテスト呼び出し時刻
- `test_run_count` (integer, required) — この呼び出しでのテスト実行数
- `passed_count` (integer, required) — 成功したテスト実行数
- `failed_count` (integer, required) — 失敗したテスト実行数
- `pending_count` (integer, required) — 保留中のテスト実行数
- `cancelled_count` (integer, required) — キャンセルされたテスト実行数
- `title` (string, required) — テスト呼び出しのタイトル。フォルダー実行の場合はフォルダー名、それ以外の場合は単一テスト名またはテスト数。
- `agent_id` (string, optional, nullable) — このテスト呼び出しが属するエージェントのID
- `branch_id` (string, optional, nullable) — このテスト呼び出しが実行されたブランチのID
- `version_id` (string, optional, nullable) — このテスト呼び出しが実行されたエージェントバージョンのID。下書きまたは設定オーバーライドによる実行では、未コミットの変更を適用したベースのバージョンです。Noneは、このフィールドが追加される前に記録された実行の場合のみです。
- `ran_against_draft` (boolean, optional, default: false) — 実行に、version_idに重ねられた未コミットの変更（保存済みドラフトまたはアドホックな設定上書き）が含まれていたかどうか。
- `runs_diverged_from_version` (boolean, optional, default: false) — この呼び出し内のテスト実行がすべて同じバージョンに対して実行されたわけではないかどうか。これは、元の実行後に実行の一部が再送信された場合に発生します。trueの場合、version_idはすべての実行ではなく、最新の再送信を示します。
- `access_info` (ResourceAccessInfo, optional, nullable) — テスト呼び出しのアクセス情報。
- `repeat_count` (integer, optional, default: 1) — この呼び出しで各テストを繰り返した回数
- `cancelled` (boolean, optional, default: false) — このテスト呼び出しがキャンセルされたかどうか
- `credits_used` (integer, optional, nullable) — この呼び出しで実行されたテスト全体に課金されたクレジットの合計です。いずれの実行にもコストデータがない場合はNoneです。
- `total_price` (double, optional, nullable) — この呼び出しで実行されたテスト全体の米ドル価格の合計です。いずれの実行にも価格データがない場合はNoneです。

### ListResponseMeta

- `total` (integer, optional, nullable)
- `page` (integer, optional, nullable)
- `page_size` (integer, optional, nullable)

### ValidationError

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

### ResourceAccessInfo

- `is_creator` (boolean, required) — リクエストを行うユーザーがエージェントの作成者かどうか
- `creator_name` (string, required) — エージェント作成者の名前
- `creator_email` (string, required) — エージェント作成者のメールアドレス
- `role` (enum, required) — リクエストを行うユーザーのロール
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `anonymous_access_level_override` (enum, optional, nullable) — 匿名ユーザーのアクセスレベル。Noneの場合、このリソースは公開共有されません。
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `access_source` (enum, optional, nullable) — リクエストしたユーザーがこのリソースにアクセスできる理由。'creator'＝呼び出し元がオーナーです。'explicit'＝呼び出し元（またはそのワークスペースグループのいずれか）が、ワークスペース全体のeveryoneグループ以外としてrole_to_group_idsに記載されています。'workspace_default'＝ワークスペース全体のeveryoneグループがrole_to_group_idsに記載されています（管理者を含む、匿名ではないすべてのワークスペースメンバーがこのリソースを閲覧できます）。'workspace_admin'＝呼び出し元がワークスペース管理者であり、管理者シートがアクセスする*唯一*の経路です。これは他の誰も閲覧できないドキュメント用に予約されています。管理者バイパスの閲覧者が明示的に共有されていないドキュメントを閲覧できる理由をUIで表示できます。
  - Allowed values: `creator`, `explicit`, `workspace_admin`, `workspace_default`

### ValidationErrorLocItems

## Examples

**Response**

```json
{
  "results": [
    {
      "id": "string",
      "created_at_unix_secs": 1,
      "test_run_count": 1,
      "passed_count": 1,
      "failed_count": 1,
      "pending_count": 1,
      "cancelled_count": 1,
      "title": "string",
      "agent_id": "string",
      "branch_id": "string",
      "version_id": "string",
      "ran_against_draft": false,
      "runs_diverged_from_version": false,
      "access_info": {
        "is_creator": true,
        "creator_name": "John Doe",
        "creator_email": "john.doe@example.com",
        "role": "admin",
        "access_source": "creator"
      },
      "repeat_count": 1,
      "cancelled": false,
      "credits_used": 1,
      "total_price": 1.1
    }
  ],
  "has_more": true,
  "meta": {
    "total": 1,
    "page": 1,
    "page_size": 1
  },
  "next_cursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/test-invocations"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/test-invocations';
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/test-invocations"

	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/test-invocations")

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/test-invocations")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/test-invocations");
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/test-invocations")! 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()
```