# Get one table

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

`GET /collection/{id}/table/{tableKey}`

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

## Path parameters

- **`id`** _(string, required)_
  Resource id
- **`tableKey`** _(string, required)_
  Table key; `main` is the default table.

## Response body

- **`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)_
- **`collection_id`** _(string)_
- **`schema`** _(object)_
  - **`version`** _(integer)_
  - **`fields`** _(array<object>)_
    - **`id`** _(string)_
    - **`key`** _(string)_
    - **`name`** _(string)_
    - **`type`** _(string)_
    - **`required`** _(boolean)_
    - **`indexed`** _(boolean)_
    - **`description`** _(string)_
    - **`options`** _(unknown)_
  - **`primary_field`** _(string)_
  - **`unique_key`** _(array,null)_
  - **`row_scope`** _(object,null)_
- **`hidden_field_keys`** _(array<string>)_
- **`can_manage`** _(boolean)_
- **`can_use`** _(boolean)_

## Code examples

### curl

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

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/collection/<id>/table/<tableKey>', {
  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/<tableKey>"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

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