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

# Tooluitvoeringen ophalen

GET https://api.elevenlabs.io/v1/convai/tools/{tool_id}/executions

Haal een gepagineerde lijst op van tooluitvoeringen voor een specifieke tool.

Reference: https://elevenlabs.io/docs/eleven-agents/api-reference/tools/get-executions

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

### Path parameters

- `tool_id` (string, required) — ID van de aangevraagde tool.

### Query parameters

- `cursor` (string, optional) — Gebruikt om de volgende pagina op te halen. De cursor wordt teruggegeven in de response.
- `page_size` (integer, optional, default: 30) — Het maximale aantal documenten dat moet worden geretourneerd. Mag niet meer zijn dan 100; standaard is dit 30.
- `is_error` (boolean, optional) — Filter op foutstatus. Als deze niet wordt opgegeven, worden alle uitvoeringen geretourneerd.
- `agent_id` (string, optional) — Filter op agent-ID.
- `branch_id` (string, optional) — Filter op agentbranch-ID.
- `start_time` (double, optional) — Filter uitvoeringen vanaf deze Unix-timestamp (inclusief).
- `end_time` (double, optional) — Filter uitvoeringen tot deze Unix-timestamp (inclusief).

## Response

### 200

Geslaagde response

- `executions` (list of ToolExecutionResponseModel, required)
- `has_more` (boolean, required)
- `next_cursor` (string, optional)

## Errors

### 422 Executions Get Request Unprocessable Entity Error

Validatiefout

- `detail` (list of ValidationError, optional)

## Types

### ToolExecutionResponseModel

- `tool_id` (string, required) — De ID van de uitgevoerde tool
- `tool_request_id` (string, required) — De request-/aanroep-ID die is gekoppeld aan deze tooluitvoering
- `conversation_id` (string, required) — De ID van het gesprek waarin de tool is uitgevoerd
- `agent_id` (string, required) — De ID van de agent die de tool heeft uitgevoerd
- `timestamp` (double, required) — Unix-timestamp waarop de tool is uitgevoerd
- `latency_secs` (double, required) — Hoe lang de tooluitvoering duurde
- `id` (string, required)
- `branch_id` (string, optional) — De branch-ID als de agent branches heeft
- `is_error` (boolean, optional, default: false) — Of de uitvoering van de tool is mislukt
- `request_payload` (string, optional) — Door het LLM geëxtraheerde parameters die naar de tool worden verzonden (JSON-tekenreeks)
- `response_payload` (string, optional) — Response geretourneerd door de tool
- `error_message` (string, optional) — Foutmelding als het uitvoeren van de tool is mislukt
- `error_type` (string, optional) — Foutcategorie (internal, customer_config, customer_auth, external_server, external_client, client_timeout, unknown)
- `tool_call_details` (ToolExecutionResponseModelToolCallDetails, optional)

### ValidationError

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

### ToolExecutionResponseModelToolCallDetails

- `type`: `api_integration_webhook`
  - `credential_id` (string, required, default: )
  - `integration_connection_id` (string, required, default: )
  - `integration_id` (string, required, default: )
  - `webhook_details` (ConversationHistoryTranscriptToolCallWebhookDetails, required)
- `type`: `client`
  - `parameters` (string, required)
- `type`: `mcp`
  - `approval_policy` (string, required)
  - `integration_type` (string, required)
  - `mcp_server_id` (string, required)
  - `mcp_server_name` (string, required)
  - `mcp_tool_description` (string, optional, default: )
  - `mcp_tool_name` (string, optional, default: )
  - `parameters` (map from string to string, optional)
  - `requires_approval` (boolean, optional, default: false)
- `type`: `webhook`
  - `method` (string, required)
  - `url` (string, required)
  - `body` (string, optional)
  - `headers` (map from string to string, optional)
  - `path_params` (map from string to string, optional)
  - `query_params` (map from string to string, optional)

### ValidationErrorLocItem

### ConversationHistoryTranscriptToolCallWebhookDetails

- `method` (string, required)
- `url` (string, required)
- `type` ("webhook", optional)
- `headers` (map from string to string, optional)
- `path_params` (map from string to string, optional)
- `query_params` (map from string to string, optional)
- `body` (string, optional)

## Examples

**Response**

```json
{
  "executions": [
    {
      "tool_id": "tool_id",
      "tool_request_id": "tool_request_id",
      "conversation_id": "conversation_id",
      "agent_id": "agent_id",
      "timestamp": 1.1,
      "latency_secs": 1.1,
      "id": "id",
      "branch_id": "branch_id",
      "is_error": true,
      "request_payload": "request_payload",
      "response_payload": "response_payload",
      "error_message": "error_message",
      "error_type": "error_type",
      "tool_call_details": {
        "type": "api_integration_webhook",
        "credential_id": "credential_id",
        "integration_connection_id": "integration_connection_id",
        "integration_id": "integration_id",
        "webhook_details": {
          "method": "method",
          "url": "url"
        }
      }
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/convai/tools/tool_id/executions"

querystring = {"agent_id":"agent_id","branch_id":"branch_id","cursor":"cursor","end_time":"1.1","is_error":"true","page_size":"1","start_time":"1.1"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/convai/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1';
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/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1"

	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/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1")

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/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/convai/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1');

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/convai/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1");
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/tools/tool_id/executions?agent_id=agent_id&branch_id=branch_id&cursor=cursor&end_time=1.1&is_error=true&page_size=1&start_time=1.1")! 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()
```