> ## 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.

# Attach connection datasets

> Attach source tables from a connected data source as datasets, making them available for analysis and queries.

Workflow for browsable sources (warehouses, databases, files): browse the
connection's resources first, then pass each chosen ``from_source`` value
here exactly as returned — never rewrite or guess source paths. For
request-shaped sources (HTTP API connections), omit ``from_source`` and
describe the request via ``params`` (``http_request_path``,
``request_body``, ``pagination_data_pointer``, pagination settings …); the
server derives the source from the connection. Up to 100 datasets attach in
one atomic request; dataset names are derived automatically (with collision
handling) unless provided.

Attachment returns immediately; data loading continues in the background.
Each returned dataset carries a ``status`` and a ``proxy_table_status``;
a dataset is queryable only once ``status`` is ``DEPLOYED`` **and**
``proxy_table_status`` is ``CREATED``. Poll the connection's dataset list
until both hold before querying. Credentials come from the connection
itself — never include secrets in this request.



## OpenAPI

````yaml https://api.summation.com/openapi.json post /v1/connections/data/{connection_id}/datasets
openapi: 3.1.0
info:
  title: summation-api public API
  version: 0.1.0
servers: []
security: []
tags:
  - name: Auth
    description: Machine authentication for API clients.
  - name: Tenant
    description: Organization and tenant context resolved by summation-api.
  - name: Projects
    description: Project resources.
  - name: Conversations
    description: Conversation and message resources.
  - name: Reports
    description: Report resources and report operations.
  - name: Runs
    description: Project run history and execution status.
  - name: Playbooks
    description: Playbook resources.
  - name: Files
    description: Project file resources.
  - name: Catalog Entries
    description: Project-scoped data asset attachments.
  - name: Data Connectors
    description: Reusable external data source connections.
  - name: App Connectors
    description: External app connectors whose tools the agent can use during chat.
  - name: Tables
    description: Canonical table metadata and catalog.
  - name: Views
    description: Canonical Summation view metadata and catalog.
  - name: Query Executions
    description: Read-only SQL query execution.
  - name: Grid
    description: Materialized grid status, sync, and lineage.
  - name: Schedules
    description: Schedule and schedule run inspection.
paths:
  /v1/connections/data/{connection_id}/datasets:
    post:
      tags:
        - Data Connectors
      summary: Attach connection datasets
      description: >-
        Attach source tables from a connected data source as datasets, making
        them available for analysis and queries.


        Workflow for browsable sources (warehouses, databases, files): browse
        the

        connection's resources first, then pass each chosen ``from_source``
        value

        here exactly as returned — never rewrite or guess source paths. For

        request-shaped sources (HTTP API connections), omit ``from_source`` and

        describe the request via ``params`` (``http_request_path``,

        ``request_body``, ``pagination_data_pointer``, pagination settings …);
        the

        server derives the source from the connection. Up to 100 datasets attach
        in

        one atomic request; dataset names are derived automatically (with
        collision

        handling) unless provided.


        Attachment returns immediately; data loading continues in the
        background.

        Each returned dataset carries a ``status`` and a ``proxy_table_status``;

        a dataset is queryable only once ``status`` is ``DEPLOYED`` **and**

        ``proxy_table_status`` is ``CREATED``. Poll the connection's dataset
        list

        until both hold before querying. Credentials come from the connection

        itself — never include secrets in this request.
      operationId: attach_data_connection_datasets
      parameters:
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
            title: Connection Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionDatasetsAttachRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid request or unsupported option.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '401':
          description: Missing, invalid, or expired credentials.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '403':
          description: Authenticated but missing the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '404':
          description: Resource not found or not accessible.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
      security:
        - SummationMachineAuth:
            - agent:write
components:
  schemas:
    ConnectionDatasetsAttachRequest:
      properties:
        datasets:
          items:
            $ref: '#/components/schemas/DatasetAttachSpec'
          type: array
          maxItems: 100
          minItems: 1
          title: Datasets
          description: >-
            Datasets to attach — 1 to 100 per request, applied as one atomic
            batch.
      type: object
      required:
        - datasets
      title: ConnectionDatasetsAttachRequest
    ProblemError:
      description: >-
        Public error envelope (RFC 7807 ``application/problem+json``).


        Mirrors the body produced by :func:`api_error`. Declaring it in the
        contract

        lets generated clients type error handling instead of guessing.
      properties:
        type:
          description: URI reference identifying the problem type.
          title: Type
          type: string
        title:
          description: Short, human-readable summary of the problem type.
          title: Title
          type: string
        status:
          description: HTTP status code.
          title: Status
          type: integer
        detail:
          description: Human-readable explanation specific to this occurrence.
          title: Detail
          type: string
        code:
          description: Stable, machine-readable error code.
          title: Code
          type: string
        request_id:
          description: Correlation id, echoed in the x-request-id header.
          title: Request Id
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
      title: ProblemError
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DatasetAttachSpec:
      properties:
        from_source:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: From Source
          description: >-
            Source path exactly as returned by browse connection resources. Omit
            for request-shaped connections (e.g. HTTP APIs), where the server
            derives it from the connection and params.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Optional dataset name; the server derives one when omitted.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional human-readable description for the dataset.
        snapshot_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Snapshot Enabled
          description: >-
            Opt this dataset into snapshotting (a periodic copy into Summation's
            lakehouse) regardless of the connection's policy. Omit to inherit
            the connection's snapshot setting. Required before a dataset
            snapshot can be taken for sources whose connection has snapshotting
            off.
        params:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
                  - additionalProperties:
                      anyOf:
                        - type: string
                        - type: integer
                        - type: number
                        - type: boolean
                    type: object
              type: object
            - type: 'null'
          title: Params
          description: >-
            Connector-specific dataset parameters, using exactly the keys the
            connection type documents — e.g. for HTTP API connections:
            http_request_path (required, starts with '/'), request_body (string
            template), request_headers (flat object), pagination_data_pointer
            (JSON pointer to the response rows), plus the connector's pagination
            settings. Values are scalars or one flat object of scalars. Never
            include credentials — authentication comes from the connection, and
            auth-related keys are rejected.
      type: object
      title: DatasetAttachSpec
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    SummationMachineAuth:
      type: oauth2
      flows:
        clientCredentials:
          scopes:
            agent:read: agent:read
            agent:write: agent:write
          tokenUrl: /v1/auth/m2m/token

````