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

# Per-document support diagnostics (visibility, failures, history).

> Answer three support facets for ONE document that no other surface exposes (BACKE-3528 / ADM-23): (1) visibility_reason - are this document's vectors present in MVS (searchable) and, if not, why (the ADM-01 unsearchable class, made per-document answerable via the ADM-02 vector-presence machinery); (2) recent_failures - the source object's own status/error, with an honest note that structured batch errors are aggregate-only; (3) diagnostic_history - the document's processing history from its own _internal records. Every facet returns a real value, or an empty/None value with a reason naming what would carry it.



## OpenAPI

````yaml get /v1/collections/{collection_identifier}/documents/{document_id}/diagnostics
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/collections/{collection_identifier}/documents/{document_id}/diagnostics:
    get:
      tags:
        - Collection Documents
      summary: Per-document support diagnostics (visibility, failures, history).
      description: >-
        Answer three support facets for ONE document that no other surface
        exposes (BACKE-3528 / ADM-23): (1) visibility_reason - are this
        document's vectors present in MVS (searchable) and, if not, why (the
        ADM-01 unsearchable class, made per-document answerable via the ADM-02
        vector-presence machinery); (2) recent_failures - the source object's
        own status/error, with an honest note that structured batch errors are
        aggregate-only; (3) diagnostic_history - the document's processing
        history from its own _internal records. Every facet returns a real
        value, or an empty/None value with a reason naming what would carry it.
      operationId: >-
        get_document_diagnostics_v1_collections__collection_identifier__documents__document_id__diagnostics_get
      parameters:
        - name: collection_identifier
          in: path
          required: true
          schema:
            type: string
            description: The ID or name of the collection.
            title: Collection Identifier
          description: The ID or name of the collection.
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the document.
            title: Document Id
          description: The ID of the document.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDiagnosticsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
          NamespaceHeader: []
components:
  schemas:
    DocumentDiagnosticsResponse:
      properties:
        document_id:
          type: string
          title: Document Id
        collection_id:
          type: string
          title: Collection Id
        source_object_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Object Id
          description: The document's originating bucket object id (lineage root).
        visibility_reason:
          $ref: '#/components/schemas/VisibilityReason'
        recent_failures:
          $ref: '#/components/schemas/RecentFailures'
        diagnostic_history:
          $ref: '#/components/schemas/DiagnosticHistory'
      type: object
      required:
        - document_id
        - collection_id
        - visibility_reason
        - recent_failures
        - diagnostic_history
      title: DocumentDiagnosticsResponse
      description: Support diagnostics for one document (BACKE-3528 / ADM-23).
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VisibilityReason:
      properties:
        searchable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Searchable
          description: >-
            True when the source object's vectors are present in MVS (the
            document is retrievable), False when confirmed absent (the ADM-01
            unsearchable class), None when it could not be determined.
        reason:
          type: string
          title: Reason
          description: Human-readable explanation of the searchable verdict.
        source_object_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Object Id
          description: >-
            The _internal.lineage.source_object_id the presence check was keyed
            on. None when the document carries no such id to check.
      type: object
      required:
        - reason
      title: VisibilityReason
      description: Whether this document's vectors are present in MVS, and why.
    RecentFailures:
      properties:
        failures:
          items:
            $ref: '#/components/schemas/RecentFailure'
          type: array
          title: Failures
          description: Per-object failures found (object status/error).
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: >-
            Present when the list is empty, or to note coverage limits (e.g.
            structured batch errors are aggregate-only, not queryable per
            object).
      type: object
      title: RecentFailures
      description: The source object's failure history, with an honest coverage note.
    DiagnosticHistory:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/DiagnosticHistoryEntry'
          type: array
          title: Entries
          description: Ordered processing-history entries read from the document.
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: >-
            Present when no entries were found, naming what durability record
            would carry richer history but exposes no per-object read surface.
      type: object
      title: DiagnosticHistory
      description: The document's safe processing history.
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RecentFailure:
      properties:
        source:
          type: string
          title: Source
          description: Where the failure was read from (e.g. 'object').
        object_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Object Id
          description: The source object's id, when known.
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: The object's processing status at read time.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: The object's recorded error message.
      type: object
      required:
        - source
      title: RecentFailure
      description: One recorded failure for the document's source object.
    DiagnosticHistoryEntry:
      properties:
        source:
          type: string
          title: Source
          description: >-
            Which record carried this entry (e.g. 'processing.history',
            'lineage.chain', 'ingestion_status').
        timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamp
          description: ISO-8601 timestamp of the entry, when available.
        detail:
          additionalProperties: true
          type: object
          title: Detail
          description: The raw entry payload.
      type: object
      required:
        - source
      title: DiagnosticHistoryEntry
      description: One processing-history entry for the document.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Mixpeek API key, sent as `Authorization: Bearer mxp_sk_...`. Create one
        in Studio under Settings → API Keys, or with an admin key via `POST
        /v1/organizations/users/{user_email}/api-keys`. A missing header returns
        403; an invalid or revoked key returns 401.
    NamespaceHeader:
      type: apiKey
      in: header
      name: X-Namespace
      description: >-
        Namespace id (`ns_...`), not the namespace name. This scopes the request
        rather than authenticating it, and it is required on every operation
        marked `x-mixpeek-namespace-scoped`.

````