Semaphor
Discovery

List tables

Returns the tables available for querying in a connection.

Which parameters are required depends on the connection type:

Connection typeRequired parameters
Database with schemas (e.g. PostgreSQL, Snowflake)connection_id, database_name, schema_name
Database without schemas (e.g. MySQL)connection_id, database_name
API or file-based connectionsconnection_id only

Results are filtered by table-level security policies on your token.

GET
/api/v1/tables

Authorization

BearerAuth
AuthorizationBearer <token>

A project-scoped access token. Generate one via the Token API.

In: header

Query Parameters

connection_id*string

Connection ID returned by GET /api/v1/connections.

database_name?string

Database or catalog name. Required for most database connections. Not needed for API or file-based connections.

schema_name?string

Schema name. Required when the connection type supports schemas (e.g. PostgreSQL, Snowflake, BigQuery). Check the connection's capabilities to determine whether schemas are used.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X get "https://semaphor.cloud/api/v1/tables?connection_id=string"
{
  "tables": [
    {
      "table_name": "string"
    }
  ],
  "sql": "string",
  "type": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}