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

# List documents visible to you

> Returns the documents you can see based on your Keycloak role.

With the ``nx1_document_user`` Keycloak role, you see only your own
uploads. With the ``nx1_document_admin`` Keycloak role, you see every
document in the system.



## OpenAPI

````yaml get /api/documents
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/documents:
    get:
      tags:
        - Documents
      summary: List documents visible to you
      description: |-
        Returns the documents you can see based on your Keycloak role.

        With the ``nx1_document_user`` Keycloak role, you see only your own
        uploads. With the ``nx1_document_admin`` Keycloak role, you see every
        document in the system.
      operationId: list_documents_api_documents_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 100
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentResponse'
                title: Response List Documents Api Documents Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    DocumentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        filename:
          type: string
          title: Filename
        owner:
          type: string
          title: Owner
        mime_type:
          type: string
          title: Mime Type
        size_bytes:
          type: integer
          title: Size Bytes
        page_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Count
        chunk_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chunk Count
        subtype:
          anyOf:
            - type: string
            - type: 'null'
          title: Subtype
        status:
          $ref: '#/components/schemas/DocumentStatusEnum'
        enrichment_status:
          $ref: '#/components/schemas/DocumentEnrichmentStatusEnum'
        datahub_urn:
          anyOf:
            - type: string
            - type: 'null'
          title: Datahub Urn
        extraction_warning:
          anyOf:
            - type: string
            - type: 'null'
          title: Extraction Warning
        suggested_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Suggested Summary
        suggested_tags:
          items:
            $ref: '#/components/schemas/SuggestionItem'
          type: array
          title: Suggested Tags
        suggested_glossary_terms:
          items:
            $ref: '#/components/schemas/SuggestionItem'
          type: array
          title: Suggested Glossary Terms
        suggested_domain:
          anyOf:
            - $ref: '#/components/schemas/SuggestionItem'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        s3_key:
          anyOf:
            - type: string
            - type: 'null'
          title: S3 Key
      type: object
      required:
        - id
        - filename
        - owner
        - mime_type
        - size_bytes
        - page_count
        - chunk_count
        - subtype
        - status
        - enrichment_status
        - datahub_urn
        - extraction_warning
        - suggested_summary
        - error
        - s3_key
      title: DocumentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentStatusEnum:
      type: string
      enum:
        - uploading
        - extracting
        - ocr_required
        - indexed
        - failed
      title: DocumentStatusEnum
      description: Lifecycle status of an ingested document.
    DocumentEnrichmentStatusEnum:
      type: string
      enum:
        - pending
        - running
        - awaiting_review
        - confirmed
        - failed
      title: DocumentEnrichmentStatusEnum
      description: Crew-driven enrichment lifecycle.
    SuggestionItem:
      properties:
        name:
          type: string
          title: Name
        is_existing:
          type: boolean
          title: Is Existing
          default: false
        urn:
          anyOf:
            - type: string
            - type: 'null'
          title: Urn
      type: object
      required:
        - name
      title: SuggestionItem
      description: A flagged enrichment suggestion for a tag, glossary term, or domain.
    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
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````