---
title: "Get available data sources for query builder"
---

> 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/data-sources`

## Authentication

Requires one of the following:

- `bearerAuth`
- `apiKey`

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/analytics/data-sources';
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/data-sources"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

List of available data sources

#### Example

```json
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "source_name": "string",
    "table_name": "string",
    "display_name": "string",
    "description": "string",
    "category": "core",
    "fields": [
      {
        "name": "string",
        "display_name": "string",
        "type": "text",
        "description": "string"
      }
    ],
    "is_active": true
  }
]
```

- `id` (`get/api/analytics/data-sources.response.200.id`; string, optional)
  - format `uuid`
- `source_name` (`get/api/analytics/data-sources.response.200.source_name`; string, optional)
- `table_name` (`get/api/analytics/data-sources.response.200.table_name`; string, optional)
- `display_name` (`get/api/analytics/data-sources.response.200.display_name`; string, optional)
- `description` (`get/api/analytics/data-sources.response.200.description`; string, optional)
- `category` (`get/api/analytics/data-sources.response.200.category`; string, optional)
  - one of `"core"`, `"messaging"`, `"webhooks"`, `"analytics"`
- `fields` (`get/api/analytics/data-sources.response.200.fields`; array<object>, optional)
  - `name` (`get/api/analytics/data-sources.response.200.fields.name`; string, optional)
  - `display_name` (`get/api/analytics/data-sources.response.200.fields.display_name`; string, optional)
  - `type` (`get/api/analytics/data-sources.response.200.fields.type`; string, optional)
    - one of `"text"`, `"integer"`, `"timestamp"`, `"boolean"`, `"jsonb"`
  - `description` (`get/api/analytics/data-sources.response.200.fields.description`; string, optional)
- `is_active` (`get/api/analytics/data-sources.response.200.is_active`; boolean, optional)

### 500

Server error

#### Example

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

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


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