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

# Adopt cached query output for a report

> Materialize only the retained successful output of an exact pinned Metrics V2 query version. Requires reports:write, data:read and current report/query/connection/network permissions. UUID retries reconcile the original cached generation. Missing or expired output remains explicit. No provider execution or saved-document edits.

Required scopes: `reports:write`, `data:read`.


## OpenAPI

````yaml POST /api/v2/reports/{reportId}/data-sources/{sourceId}/adopt
openapi: 3.1.1
info:
  title: chatobserver public API
  version: '2026-09-09'
  description: >-
    Track AI visibility, manage prompts, inspect collected answers and
    citations, and integrate workspace data with your own tools. Visibility
    endpoints use workspace API keys. Data endpoints use scoped service-account
    keys; spreadsheet client endpoints use authorised client sessions. See the
    authentication guide for each credential type.
  contact:
    name: chatobserver support
    url: https://chatobserver.com/contact
    email: support@chatobserver.com
servers:
  - url: https://app.chatobserver.com
    description: Production API
security:
  - WorkspaceKey: []
  - BearerKey: []
tags:
  - name: Workspace
    description: Validate access and list the workspace project and available platforms.
  - name: Prompts
    description: Create, schedule, organise, activate and retrieve tracked prompts.
  - name: Answers
    description: Retrieve collected AI answers, their analysis and visibility trends.
  - name: Brands
    description: Manage brands and compare their visibility in AI answers.
  - name: Sources and citations
    description: Analyse cited domains, pages and ownership across answers.
  - name: Visitor analytics
    description: Read website visitor and crawler analytics for the workspace.
  - name: Content opportunities
    description: Retrieve content-gap findings and recommendations for tracked prompts.
  - name: Usage
    description: Read workspace consumption and allowance summaries.
  - name: Data connections
    description: Discover authorised connections, source accounts and connector catalogues.
  - name: Data queries
    description: >-
      Create versioned queries, publish definitions and inspect integration
      contracts.
  - name: Data operations
    description: >-
      Execute, validate, cancel and inspect operations and page through result
      rows.
  - name: Data delivery
    description: Manage schedules, transfers, destinations and import workflows.
  - name: Data definitions
    description: Manage reusable definitions and their immutable versions.
  - name: Data webhooks
    description: >-
      Configure event delivery, inspect deliveries, replay events and rotate
      secrets.
  - name: Client authorisation
    description: Authorise spreadsheet clients using a user-approved challenge exchange.
  - name: Spreadsheet clients
    description: >-
      Access document-bound client sessions, queries, schedules, bindings and
      write claims.
  - name: AI visibility audits
    description: Create website visibility audits and retrieve their report links.
  - name: Version 1
    description: Integrate with the version 1 visibility and analytics endpoints.
  - name: Tracked coverage
    description: >-
      Track published coverage, maintain its metadata and inspect exact-page
      citation evidence with the same workspace feature access as the dashboard.
  - name: Reports
    description: >-
      Discover accessible native reports and assess exact saved revisions using
      measured, context-specific evidence.
paths:
  /api/v2/reports/{reportId}/data-sources/{sourceId}/adopt:
    post:
      tags:
        - Reports
      summary: Adopt cached query output for a report
      description: >-
        Materialize only the retained successful output of an exact pinned
        Metrics V2 query version. Requires reports:write, data:read and current
        report/query/connection/network permissions. UUID retries reconcile the
        original cached generation. Missing or expired output remains explicit.
        No provider execution or saved-document edits.
      operationId: adoptReportQueryOutput
      parameters:
        - name: reportId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: x-workspace-id
          in: header
          required: true
          schema:
            type: string
            pattern: ^ws_[a-f0-9]{32}$
          description: Explicit workspace selected for the delegated account.
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: sourceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Native attachment readiness.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportQueryAttachmentResponseV1'
        '400':
          description: Rejected request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Rejected request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Rejected request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Rejected request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Rejected request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: Rejected request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - McpConnection: []
components:
  schemas:
    ReportQueryAttachmentResponseV1:
      type: object
      properties:
        data:
          type: object
          properties:
            attachmentId:
              type: string
              format: uuid
            reportId:
              type: string
              format: uuid
            stableKey:
              type: string
              maxLength: 128
            displayName:
              type: string
              maxLength: 160
            attachmentVersionId:
              anyOf:
                - type: string
                  format: uuid
                - type: 'null'
            generationId:
              anyOf:
                - type: string
                  format: uuid
                - type: 'null'
            status:
              type: string
              maxLength: 64
            catalogue:
              anyOf:
                - type: object
                  properties:
                    version:
                      type: number
                      const: 1
                    attachmentId:
                      type: string
                      format: uuid
                    source:
                      type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - metrics_query
                            - native
                            - upload
                            - blend
                        connectorKey:
                          type: string
                          minLength: 1
                          maxLength: 64
                        sourceAccountIds:
                          type: array
                          items:
                            type: integer
                            exclusiveMinimum: 0
                          maxItems: 25
                        catalogueSnapshotIds:
                          type: array
                          items:
                            type: string
                            format: uuid
                          maxItems: 25
                      required:
                        - kind
                        - connectorKey
                        - sourceAccountIds
                        - catalogueSnapshotIds
                      additionalProperties: false
                    fields:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 8
                            maxLength: 128
                          sourceFieldId:
                            anyOf:
                              - type: string
                                minLength: 1
                                maxLength: 256
                              - type: 'null'
                          displayName:
                            type: string
                            minLength: 1
                            maxLength: 160
                          description:
                            anyOf:
                              - type: string
                                maxLength: 2000
                              - type: 'null'
                          role:
                            type: string
                            enum:
                              - dimension
                              - measure
                              - parameter
                          dataType:
                            type: string
                            enum:
                              - string
                              - boolean
                              - integer
                              - decimal
                              - percent
                              - currency
                              - date
                              - datetime
                              - duration
                              - url
                              - image_url
                              - country
                              - region
                              - city
                              - latitude
                              - longitude
                              - enum
                          defaultAggregation:
                            type: string
                            enum:
                              - none
                              - sum
                              - average
                              - weighted_average
                              - count
                              - count_distinct
                              - minimum
                              - maximum
                              - median
                          allowedAggregations:
                            type: array
                            items: 63a380ed-c6b7-4b45-806f-12e14667e504
                            minItems: 1
                            maxItems: 12
                          format:
                            anyOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - number
                                      - percent
                                      - currency
                                      - date
                                      - datetime
                                      - duration
                                  locale:
                                    anyOf:
                                      - type: string
                                        minLength: 2
                                        maxLength: 32
                                      - type: 'null'
                                  currencyCode:
                                    anyOf:
                                      - type: string
                                        pattern: ^[A-Z]{3}$
                                      - type: 'null'
                                  minimumFractionDigits:
                                    anyOf:
                                      - type: integer
                                        minimum: 0
                                        maximum: 20
                                      - type: 'null'
                                  maximumFractionDigits:
                                    anyOf:
                                      - type: integer
                                        minimum: 0
                                        maximum: 20
                                      - type: 'null'
                                  compact:
                                    type: boolean
                                  dateStyle:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - short
                                          - medium
                                          - long
                                          - full
                                      - type: 'null'
                                  timeStyle:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - short
                                          - medium
                                          - long
                                          - full
                                      - type: 'null'
                                required:
                                  - kind
                                  - locale
                                  - currencyCode
                                  - minimumFractionDigits
                                  - maximumFractionDigits
                                  - compact
                                  - dateStyle
                                  - timeStyle
                                additionalProperties: false
                              - type: 'null'
                          semanticTags:
                            type: array
                            items:
                              type: string
                              minLength: 1
                              maxLength: 64
                            maxItems: 40
                          nullable:
                            type: boolean
                          hidden:
                            type: boolean
                          sensitive:
                            type: boolean
                          filter:
                            type: object
                            properties:
                              allowed:
                                type: boolean
                              operators:
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 64
                                maxItems: 30
                              valueResolverId:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                    maxLength: 128
                                  - type: 'null'
                            required:
                              - allowed
                              - operators
                              - valueResolverId
                            additionalProperties: false
                          orderable:
                            type: boolean
                          lineage:
                            anyOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    const: metrics
                                  connectorKey:
                                    type: string
                                    minLength: 1
                                    maxLength: 64
                                  sourceAccountId:
                                    type: integer
                                    exclusiveMinimum: 0
                                  catalogueSnapshotId:
                                    type: string
                                    format: uuid
                                  sourceFieldId:
                                    type: string
                                    minLength: 1
                                    maxLength: 256
                                  providerFieldId:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 512
                                      - type: 'null'
                                  origin:
                                    anyOf:
                                      - type: string
                                        minLength: 1
                                        maxLength: 64
                                      - type: 'null'
                                required:
                                  - kind
                                  - connectorKey
                                  - sourceAccountId
                                  - catalogueSnapshotId
                                  - sourceFieldId
                                  - providerFieldId
                                  - origin
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    const: native
                                  datasetId:
                                    type: string
                                    minLength: 1
                                    maxLength: 256
                                  sourceFieldId:
                                    type: string
                                    minLength: 1
                                    maxLength: 256
                                required:
                                  - kind
                                  - datasetId
                                  - sourceFieldId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    const: upload
                                  uploadVersionId:
                                    type: string
                                    format: uuid
                                  columnId:
                                    type: string
                                    minLength: 1
                                    maxLength: 256
                                required:
                                  - kind
                                  - uploadVersionId
                                  - columnId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    const: calculated
                                  definitionId:
                                    type: string
                                    minLength: 1
                                    maxLength: 128
                                  dependencyFieldIds:
                                    type: array
                                    items:
                                      type: string
                                      minLength: 1
                                      maxLength: 128
                                    maxItems: 100
                                required:
                                  - kind
                                  - definitionId
                                  - dependencyFieldIds
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    const: blend
                                  blendId:
                                    type: string
                                    minLength: 1
                                    maxLength: 128
                                  inputFieldIds:
                                    type: array
                                    items:
                                      type: string
                                      minLength: 1
                                      maxLength: 128
                                    minItems: 1
                                    maxItems: 200
                                required:
                                  - kind
                                  - blendId
                                  - inputFieldIds
                                additionalProperties: false
                        required:
                          - id
                          - sourceFieldId
                          - displayName
                          - description
                          - role
                          - dataType
                          - defaultAggregation
                          - allowedAggregations
                          - format
                          - semanticTags
                          - nullable
                          - hidden
                          - sensitive
                          - filter
                          - orderable
                          - lineage
                        additionalProperties: false
                      maxItems: 5000
                    generatedAt:
                      type: string
                      format: date-time
                    schemaFingerprint:
                      type: string
                      pattern: ^[0-9a-f]{64}$
                  required:
                    - version
                    - attachmentId
                    - source
                    - fields
                    - generatedAt
                    - schemaFingerprint
                  additionalProperties: false
                - type: 'null'
            generation:
              anyOf:
                - type: object
                  properties:
                    status:
                      type: string
                      maxLength: 64
                    freshness:
                      type: string
                      maxLength: 64
                    rowCount:
                      type: integer
                      minimum: 0
                    warnings:
                      type: array
                      items:
                        type: string
                        maxLength: 128
                      maxItems: 500
                  required:
                    - status
                    - freshness
                    - rowCount
                    - warnings
                  additionalProperties: false
                - type: 'null'
          required:
            - attachmentId
            - reportId
            - stableKey
            - displayName
            - attachmentVersionId
            - generationId
            - status
            - catalogue
            - generation
          additionalProperties: false
        adoption:
          type: object
          properties:
            state:
              type: string
              enum:
                - complete
                - pending
                - failed
                - needs_repair
            issueCode:
              anyOf:
                - type: string
                  maxLength: 128
                - type: 'null'
            generationId:
              anyOf:
                - type: string
                  format: uuid
                - type: 'null'
          required:
            - state
            - issueCode
            - generationId
          additionalProperties: false
      required:
        - data
      additionalProperties: false
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          required:
            - code
            - message
        requestId:
          type: string
      required:
        - error
        - requestId
  securitySchemes:
    WorkspaceKey:
      type: apiKey
      in: header
      name: x-chatobserver-key
      description: >-
        A workspace API key. Data endpoints require a service-account key with
        the specified scopes.
    BearerKey:
      type: http
      scheme: bearer
      description: The workspace or service-account API key as a bearer token.
    McpConnection:
      type: http
      scheme: bearer
      description: >-
        Delegated application credential issued after Chatobserver account
        consent. Restricted to selected workspaces and explicitly supported MCP
        operations. The MCP server access token is a separate credential and
        cannot be used here.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.