PermuteDocs
Go to Permute

Sources · sourcesGet

Get a source

Returns source details and queryable tables. Set includeFields=false to list tables without columns, then pass tableId to describe one table. Materialized connector fields reflect the stored SQL table.

GET/v1/sources/{sourceId}
betaauthenticatedworkspace

When to use

List queryable tables or describe one table before writing SQL.

For agents

Set includeFields=false to list tables without every column. Then pass the returned tableId to inspect one table. Materialized connector columns reflect stored SQL data.

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 await client.sources.listTables('conn_hubspot123');
await client.sources.describeTable('conn_hubspot123', 'blok_deals');;

Response

json
{
  "data": {
    "source": {
      "id": "conn_hubspot123",
      "type": "connector",
      "name": "HubSpot",
      "provider": "hubspot",
      "summary": "hubspot connector"
    },
    "metadata": {
      "provider": "hubspot",
      "status": "active"
    },
    "tables": [
      {
        "id": "blok_deals",
        "name": "deals",
        "label": "Deals",
        "provider": "hubspot",
        "fieldCount": 2,
        "fields": [
          {
            "name": "dealname",
            "type": "VARCHAR",
            "description": null
          },
          {
            "name": "amount",
            "type": "DOUBLE",
            "description": null
          }
        ]
      }
    ]
  }
}