---
title: "List SQL Tables"
method: GET
path: "/sql/tables"
tags: ["SQL Queries"]
---

# List SQL Tables

`GET /sql/tables`

## Request

- Base URL: `https://api.us-e1.tago.io`
- URL: `https://api.us-e1.tago.io/sql/tables`
- Auth: API key in header `Profile-Token`
- TypeScript: <https://skmtc.dev/tago/apis/tagoio-api/docs/sql/tables/get.ts> (a function with typed inputs; its response is checked against the schema)

Schema discovery for the query editor. Returns the static table catalog (the virtual table families, each with its `function`, human `label`, an optional `tag_form` selector, and typed `columns`) plus a profile-scoped, paginated list of your own devices and entities. The catalog is identical for every caller and can never leak a hidden column. The `device_data_by_tag` fan-out family has no `tag_form` and prefixes the device-data columns with `device` and `device_name`.

## Query parameters

- `filter` string
- `amount` integer
- `page` integer
- `entity_id` string

## Response `200`

Table catalog and your resources.

- object
  - `status` boolean
  - `result` object
    - `tables` object[]
      - `function` string
      - `label` string
      - `tag_form` string
      - `columns` object[]
        - `name` string
        - `type` string
      - `dynamic` boolean
    - `functions` object[]: Everything callable inside a query that is not a table function, built from the allowlist and identical for every caller. `kind` is `aggregate` or `session`. `example` is present only on session entries and shows the COALESCE authoring fallback; COALESCE is accepted only wrapping a session function, never as a standalone function.
      - `name` string
      - `kind` 'aggregate' | 'session'
      - `args` string[]
      - `description` string
      - `example` string: Present only on session entries.
    - `resources` object
      - `devices` object[]
        - `id` string
        - `name` string
      - `entities` object[]
        - `id` string
        - `name` string

## Changes

- **2026-11-07** `1a281f04cdab`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tago/apis/tagoio-api/changes/sql/tables/get.md)

---

[API](https://skmtc.dev/tago/apis/tagoio-api.md) - [All operations](https://skmtc.dev/tago/apis/tagoio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tago/apis/tagoio-api/revisions/1a281f04cdab?raw)
