---
title: "Get query execution history/logs"
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Analytics

`GET /api/analytics/executions`

## Authentication

Requires one of the following:

- `bearerAuth`
- `apiKey`

## Query parameters

- `limit` (`get/api/analytics/executions.query.limit`; integer, optional) — Number of executions to return
  - min 1; max 100; default `50`
- `offset` (`get/api/analytics/executions.query.offset`; integer, optional) — Number of executions to skip
  - min 0; default `0`
- `status` (`get/api/analytics/executions.query.status`; string, optional) — Filter by execution status
  - one of `"success"`, `"error"`, `"timeout"`

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.channelautomation.com/api/analytics/executions
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/analytics/executions';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/analytics/executions"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Query execution logs

#### Example

```json
{
  "executions": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "workspace_id": "string",
      "user_email": "string",
      "sql_query": "string",
      "execution_time_ms": 0,
      "result_count": 0,
      "status": "success",
      "error_details": "string",
      "executed_at": "2019-08-24T14:15:22Z"
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}
```

- `executions` (`get/api/analytics/executions.response.200.executions`; array<object>, optional)
  - `id` (`get/api/analytics/executions.response.200.executions.id`; string, optional)
    - format `uuid`
  - `workspace_id` (`get/api/analytics/executions.response.200.executions.workspace_id`; string, optional)
  - `user_email` (`get/api/analytics/executions.response.200.executions.user_email`; string, optional)
  - `sql_query` (`get/api/analytics/executions.response.200.executions.sql_query`; string, optional)
  - `execution_time_ms` (`get/api/analytics/executions.response.200.executions.execution_time_ms`; integer, optional)
  - `result_count` (`get/api/analytics/executions.response.200.executions.result_count`; integer, optional)
  - `status` (`get/api/analytics/executions.response.200.executions.status`; string, optional)
    - one of `"success"`, `"error"`, `"timeout"`
  - `error_details` (`get/api/analytics/executions.response.200.executions.error_details`; string, optional)
  - `executed_at` (`get/api/analytics/executions.response.200.executions.executed_at`; string, optional)
    - format `date-time`
- `total` (`get/api/analytics/executions.response.200.total`; integer, optional)
- `limit` (`get/api/analytics/executions.response.200.limit`; integer, optional)
- `offset` (`get/api/analytics/executions.response.200.offset`; integer, optional)

### 400

Workspace ID required

#### Example

```json
{
  "error": "string",
  "details": "string"
}
```

- `error` (`get/api/analytics/executions.response.400.error`; string, optional)
- `details` (`get/api/analytics/executions.response.400.details`; string, optional)

### 500

Server error

#### Example

```json
{
  "error": "string",
  "details": "string"
}
```

- `error` (`get/api/analytics/executions.response.500.error`; string, optional)
- `details` (`get/api/analytics/executions.response.500.details`; string, optional)


Source: https://developer.channelautomations.com/api/get-api-analytics-executions/index.md
