> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connections

> Create, test, and browse data and app connections over the API, including the key names that trip people up.

Connections are the one area where the contract will actively mislead you: config keys differ between what you send and what you read back, and a connection built from wrong keys is created successfully and reports `ACTIVE` until you test it.

Read this page before writing connector code. Per-connector key names are on the [connector pages](/features/connectors#supported-data-sources); the product-side walkthrough is [Connectors](/features/connectors).

## Add a data connection

<CardGroup cols={2}>
  <Card title="GET /v1/connections/data/types" icon="code" href="/api-reference/data-connectors/list-connector-types" horizontal>
    List the connector types whose `config` and `secrets` keys are published, plus `undocumented_types` for the rest. Read this before creating a connection.
  </Card>

  <Card title="GET /v1/connections/data/types/{connector_type}" icon="code" href="/api-reference/data-connectors/show-connector-type" horizontal>
    Show one connector type's keys, plus a ready-to-send create example.
  </Card>

  <Card title="POST /v1/connections/data" icon="code" href="/api-reference/data-connectors/create-connection" horizontal>
    Create a connection.
  </Card>

  <Card title="POST /v1/connections/data/{connection_id}/tests" icon="code" href="/api-reference/data-connectors/test-connection" horizontal>
    Test a connection.
  </Card>

  <Card title="POST /v1/connections/data/{connection_id}/resources" icon="code" href="/api-reference/data-connectors/browse-connection-resources" horizontal>
    Browse what a connection can see.
  </Card>

  <Card title="POST /v1/connections/data/{connection_id}/datasets" icon="code" href="/api-reference/data-connectors/attach-connection-datasets" horizontal>
    Attach datasets to a connection.
  </Card>
</CardGroup>

**Read the keys; don't infer them.** Config keys are lowercase and prefixed per connector: `pg_db` for Postgres, `snowflake_account` for Snowflake. The **Form fields** table on each connector page lists *form labels*, not API keys; where a page has an **API key** column, that is the one to send. Responses render keys in camelCase (`pgDb`), so reading a key off a `GET` and sending it straight back will also fail.

<Warning>
  **Always `test` immediately after `create`.** A `config` object accepts unknown keys, so a connection built from the wrong key names is created and reports `ACTIVE`. Nothing goes wrong until `test`, and the error names the form label rather than the key it wanted.
</Warning>

Connection names become secret-store keys: use `kebab-case`, since spaces are rejected with a validation error that doesn't explain itself.

<Warning>
  The types listing returns two sets. `types` are the connector types whose keys are published; the detail route gives you those plus a ready-to-send example. `undocumented_types` are types the product supports whose keys are **not published yet**; their detail route returns `not_documented` and points you at the app. A type listed there is supported, but without published key names you would be guessing at fields, so create it in the app once; everything about it works over the API afterwards.
</Warning>

* **A `not_documented` response is about the key names, not the capability.** Creation validates against the connector's real field set, so an undocumented type can pass type validation and fail on a *field* error instead. A field error means the type was accepted.
* **Validation errors name UI labels, not keys.** Map the label back through the type listing.
* **`sumcli connections list` can return `{"connections": []}` when connections exist.** The CLI reads `data.connections`; the API returns them under `data.connectors`. If the list looks empty but the user says they created one, check `GET /v1/connections/data` before telling them otherwise.
* **Attaching datasets is not enough to make data usable.** They deploy at tenant level but are not in the project until you also `catalog attach` each table. Skip it and the analyst sees nothing, which surfaces much later as an inexplicably empty report. Check with `catalog list`; it must be non-empty.
* **Browse with no prefix first, then use the paths it returns.** The prefix shape is source-specific (a schema name alone for Postgres, a longer path elsewhere), and a prefix that matches nothing comes back as an empty result with `ok: true`, which is indistinguishable from a source with no tables.
* **Name each dataset as you attach it.** `--name` is only accepted alongside a single `--from-source`, and there is no rename afterwards, so a batch attach leaves permanent auto-generated names.
* **Browsing won't show columns.** They're only visible once a dataset is attached, so choosing what to attach is done on table names alone.
* **On sources that fold case** (Snowflake and friends), the same path can expose both `PERSONS` and `persons` as different tables. Unquoted SQL folds to uppercase, so an existing analysis usually means the uppercase one. This does not apply to Postgres.

## Manage a connection

<CardGroup cols={2}>
  <Card title="GET /v1/connections/data" icon="code" href="/api-reference/data-connectors/list-connections" horizontal>
    List connections.
  </Card>

  <Card title="GET /v1/connections/data/{connection_id}" icon="code" href="/api-reference/data-connectors/show-connection" horizontal>
    Show a connection.
  </Card>

  <Card title="PATCH /v1/connections/data/{connection_id}" icon="code" href="/api-reference/data-connectors/update-connection" horizontal>
    Update a connection.
  </Card>

  <Card title="DELETE /v1/connections/data/{connection_id}" icon="code" href="/api-reference/data-connectors/delete-connection" horizontal>
    Delete a connection.
  </Card>

  <Card title="POST /v1/connections/data/{connection_id}/tests" icon="code" href="/api-reference/data-connectors/test-connection" horizontal>
    Re-test a connection's credentials and reachability at any time.
  </Card>
</CardGroup>

## Datasets and refresh

<CardGroup cols={2}>
  <Card title="GET /v1/connections/data/{connection_id}/datasets" icon="code" href="/api-reference/data-connectors/list-connection-datasets" horizontal>
    List a connection's datasets.
  </Card>

  <Card title="GET /v1/connections/data/{connection_id}/snapshots" icon="code" href="/api-reference/data-connectors/list-snapshot-runs" horizontal>
    List snapshot runs.
  </Card>

  <Card title="PATCH /v1/connections/data/{connection_id}/datasets/{dataset_id}" icon="code" href="/api-reference/data-connectors/update-connection-dataset" horizontal>
    Rename a dataset or change its description.
  </Card>

  <Card title="DELETE /v1/connections/data/{connection_id}/datasets/{dataset_id}" icon="code" href="/api-reference/data-connectors/detach-connection-dataset" horizontal>
    Detach a dataset from the connection, leaving the source table in place. Requires `confirm=true`.
  </Card>

  <Card title="POST /v1/connections/data/{connection_id}/datasets/{dataset_id}/snapshots" icon="code" href="/api-reference/data-connectors/snapshot-dataset" horizontal>
    Snapshot a dataset now.
  </Card>
</CardGroup>

## Connect an app

<CardGroup cols={2}>
  <Card title="GET /v1/connections/app/catalog" icon="code" href="/api-reference/app-connectors/list-available-app-connectors" horizontal>
    List available app connectors.
  </Card>

  <Card title="GET /v1/connections/app" icon="code" href="/api-reference/app-connectors/list-app-connections" horizontal>
    List connected apps.
  </Card>

  <Card title="GET /v1/connections/app/catalog/{app_key}/tools" icon="code" href="/api-reference/app-connectors/list-app-connector-tools" horizontal>
    List what an app connector can do.
  </Card>

  <Card title="GET /v1/connections/app/{connection_id}" icon="code" href="/api-reference/app-connectors/show-app-connection" horizontal>
    Show a connected app.
  </Card>

  <Card title="PATCH /v1/connections/app/{connection_id}" icon="code" href="/api-reference/app-connectors/update-app-connection" horizontal>
    Update a connected app.
  </Card>

  <Card title="POST /v1/connections/app/{connection_id}/disconnect" icon="code" href="/api-reference/app-connectors/disconnect-app-connection" horizontal>
    Disconnect an app, keeping its connection record.
  </Card>

  <Card title="DELETE /v1/connections/app/{connection_id}" icon="code" href="/api-reference/app-connectors/delete-app-connection" horizontal>
    Delete an app connection.
  </Card>
</CardGroup>
