# List the tables in a collection

> Source: https://elaichi.ai/docs/api-reference/collections/collection/listcollectiontables/

`GET /collection/{id}/table`

Resource: **Collection** · API: **Collections**

## Path parameters

- **`id`** _(string, required)_
  Resource id

## Query parameters

- **`q`** _(string)_
  Substring match on the key, name or description. LIKE wildcards are matched literally. Max 200 characters.

## Response body

- **`result`** _(array<object>)_
  - **`key`** _(string)_
  - **`name`** _(string)_
  - **`description`** _(string)_
  - **`is_default`** _(boolean)_
  - **`schema_version`** _(integer)_
  - **`field_count`** _(integer)_
  - **`row_scope_field`** _(string,null)_
  - **`stats`** _(object,null)_
  - **`row_visibility`** _(string)_
    Allowed: `all`, `own`
  - **`updated_by_name`** _(string,null)_
  - **`created_at`** _(string)_
  - **`updated_at`** _(string)_
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_
- **`can_create`** _(boolean)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/collection/<id>/table' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/collection/<id>/table', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/collection/<id>/table"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
