SQL Queries

List SQL Tables

Changed on

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.

get/sql/tables

Request

Query parameters

filterstring
Example:sensor

Substring match on the resource name (devices/entities list).

amountinteger
Example:20

Default 20, clamped 1..=100.

pageinteger
Example:1

1-based, floor 1.

entity_idstring
Example:62a1b3c4d5e6f7a8b9c0d1e2

Resolve the columns of one entity you own. Without it, the entity table is reported dynamic: true with no columns; with a valid, owned id, its resolved columns are filled in and dynamic is cleared.

Response

Table catalog and your resources.

statusboolean

Example response

{
  "status": true,
  "result": {
    "tables": [
      {
        "function": "device",
        "label": "Device Data",
        "tag_form": "device_tag"
      }
    ],
    "functions": [
      {
        "name": "session_user_tag",
        "kind": "session",
        "args": [
          "key"
        ],
        "description": "The executing user's value for a tag key, filled by the server",
        "example": "COALESCE(session_user_tag('key'), '...')"
      }
    ]
  }
}

Changes