PermuteDocs
Dashboard

Sources · sourcesGet

Get a source

Returns source details, queryable tables, fields, and metadata.

GET/v1/sources/{sourceId}
betaapiKeyworkspace

When to use

Inspect tables and fields before asking for exact rows or writing SQL.

For agents

Use source details to ground source selection. Do not infer columns that are not listed.

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.sources.get('conn_hubspot123');

Response

json
{
  "data": {
    "source": {
      "id": "conn_hubspot123",
      "type": "connector",
      "name": "HubSpot",
      "provider": "hubspot",
      "summary": "hubspot connector"
    },
    "metadata": {
      "provider": "hubspot",
      "status": "active"
    },
    "tables": [
      {
        "id": "schema_deals",
        "name": "deals",
        "label": "Deals",
        "provider": "hubspot",
        "fieldCount": 42,
        "fields": [
          {
            "name": "dealname",
            "type": "string",
            "nullable": false,
            "isPrimaryKey": false
          },
          {
            "name": "amount",
            "type": "number",
            "nullable": true,
            "isPrimaryKey": false
          }
        ]
      }
    ]
  }
}