PermuteDocs
Go to Permute

Databases · databaseTablesList

List database tables

Lists readable tables across customer schemas, excluding internal schemas.

GET/v1/databases/{databaseId}/tables
betaapiKeyworkspace

When to use

Discover readable tables and their columns across customer schemas.

For agents

Internal schemas are hidden. Imported tables may appear here even when they are not writable.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const client = orgClient.withWorkspace(process.env.PERMUTE_WORKSPACE_ID!);

const result = await client.databases.tables('dbas_crm123');

Response

json
{
  "data": {
    "items": [
      {
        "schema": "app",
        "name": "customers",
        "columns": [
          {
            "name": "id",
            "type": "text",
            "nullable": false
          },
          {
            "name": "name",
            "type": "text",
            "nullable": false
          }
        ],
        "primaryKey": [
          "id"
        ]
      }
    ]
  }
}