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

# Get File

> Retrieve details of a specific file.



## OpenAPI

````yaml get /apps/{app_id}/files/{file_id}
openapi: 3.0.0
info:
  version: 1.0.0
  title: API
servers: []
security: []
paths:
  /apps/{app_id}/files/{file_id}:
    get:
      summary: Get File
      description: Retrieve details of a specific file.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the app
          name: app_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the file
          name: file_id
          in: path
        - schema:
            type: string
            description: Optional bucket name for storage operations
            example: cortex-eu
          required: false
          name: bucket
          in: query
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppFileSchema'
components:
  schemas:
    AppFileSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        file_id:
          type: string
          description: File identifier used in the storage system
        file_filename:
          type: string
          description: Name of the file
          example: document.pdf
        file_size:
          type: number
          description: Size of the file in bytes
          example: 1024
        file_mimetype:
          type: string
          description: MIME type of the file
          example: application/pdf
        file_url:
          type: string
          description: URL to access the file
        file_format:
          type: string
          enum:
            - DOCUMENT
          description: Format of the file
          example: DOCUMENT
        file_status:
          type: string
          enum:
            - PROCESSING
            - PROCESSED
            - FAILED
          description: Current status of the file
          example: PROCESSED
        file_status_message:
          type: string
          description: >-
            Status message providing additional information about the file
            status
        document:
          $ref: '#/components/schemas/DocumentSchema'
        document_extract_contents:
          type: boolean
          description: Flag indicating whether to extract contents from the document
        document_extract_images:
          type: boolean
          description: Flag indicating whether to extract images from the document
        document_extract_pages:
          type: boolean
          description: Flag indicating whether to extract pages from the document
        document_pages:
          type: array
          items:
            type: number
          maxItems: 1024
          description: Array of page numbers to extract from the document
          example:
            - 1
            - 2
            - 3
        document_progress:
          type: number
          description: Progress of the document extraction process
        storage:
          $ref: '#/components/schemas/AppFileStorageSchema'
        created_at:
          type: string
          nullable: true
          description: Timestamp when the file was created
          format: date
      required:
        - id
        - file_id
        - file_filename
        - file_size
        - file_mimetype
        - file_url
        - created_at
      description: Detailed information about a file
    DocumentSchema:
      type: object
      properties:
        filename:
          type: string
          description: Name of the document file
        filetype:
          type: string
          description: Type of the document file
        contents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentContentSchema'
          description: >-
            Array of document contents (only available if extract_contents is
            true)
        images:
          type: array
          items:
            $ref: '#/components/schemas/DocumentImageSchema'
          description: Array of document images (only available if extract_images is true)
        extracted_pages:
          type: string
          description: >-
            Extracted pages from the document (only available if extract_pages
            is true)
        time:
          type: number
          description: Time taken to process the document
      required:
        - filename
        - filetype
        - contents
        - images
      description: Document data associated with the file
    AppFileStorageSchema:
      type: string
      enum:
        - PERSISTENT
        - TEMPORARY
      default: PERSISTENT
      description: >-
        Whether the file is stored permanently or temporarily, indicating the
        storage type
      example: PERSISTENT
    DocumentContentSchema:
      type: object
      properties:
        id:
          type: number
          description: Unique identifier for the content
        type:
          type: string
          enum:
            - TITLE
            - TEXT
            - UNTEXT
            - NARRATIVETEXT
            - BULLETEDTEXT
            - ABSTRACT
            - THREADING
            - FORM
            - FIELD-NAME
            - VALUE
            - LINK
            - COMPOSITEELEMENT
            - IMAGE
            - PICTURE
            - FIGURECAPTION
            - FIGURE
            - CAPTION
            - LIST
            - LISTITEM
            - LIST-ITEM
            - CHECKED
            - UNCHECKED
            - ADDRESS
            - EMAILADDRESS
            - PAGEBREAK
            - FORMULA
            - TABLE
            - HEADER
            - HEADLINE
            - SUBHEADLINE
            - PAGE-HEADER
            - SECTION-HEADER
            - FOOTER
            - FOOTNOTE
            - PAGE-FOOTER
          description: Type of the content element
        content:
          type: string
          description: Content text
        content_as_html:
          type: string
          description: Content text in HTML format
        page:
          type: number
          description: Page number where the content is located in the document
        parent:
          type: number
          description: Parent content identifier
      required:
        - id
        - type
        - content
        - page
      description: Detailed information about the content of a document
    DocumentImageSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the image
        file_id:
          type: string
          description: File identifier associated with the image
        image_url:
          type: string
          description: URL of the image
        type:
          type: string
          description: Type of the image
        page:
          type: number
          description: Page number where the image is located in the document
        height:
          type: number
          description: Height of the image
        width:
          type: number
          description: Width of the image
      required:
        - id
        - file_id
        - image_url
        - type
        - page
        - height
        - width
      description: Detailed information about an image in a document

````