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

# Update download status of a model file



## OpenAPI

````yaml /api-reference/ai-navigator-api.json patch /api/models/{modelId}/files/{fileId}
openapi: 3.0.0
info:
  title: AI Navigator API
  version: 1.0.0
  description: API documentation for AI Navigator
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /api/models/{modelId}/files/{fileId}:
    patch:
      tags:
        - Models
        - Files
      summary: Update download status of a model file
      parameters:
        - in: path
          name: modelId
          required: true
          schema:
            type: string
          description: ID of the model
        - in: path
          name: fileId
          required: true
          schema:
            type: string
          description: ID of the file
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DownloadAction'
      responses:
        '200':
          description: Download status updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadStatus'
        '400':
          description: Invalid action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Model or file not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DownloadAction:
      type: object
      required:
        - action
      properties:
        action:
          type: string
          enum:
            - start
            - pause
            - resume
          description: Action to perform on the download
    DownloadStatus:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - in_progress
                - paused
                - completed
              description: Current status of the download
            progress:
              $ref: '#/components/schemas/Download'
              description: >-
                Download progress information (only when status is in_progress
                or paused)
            localPath:
              type: string
              description: >-
                Local path where the file is stored (only when status is
                completed)
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - INVALID_REQUEST
                - DATABASE_NOT_RUNNING
                - INTERNAL_SERVER_ERROR
                - INVALID_SERVER_ID
                - SERVER_NOT_RUNNING
                - SERVER_RUNNING
                - INTERNAL_SERVER_ERROR
            message:
              type: string
    Download:
      type: object
      required:
        - fileId
        - modelId
        - filename
        - downloadedRatio
        - transferredBytes
        - totalBytes
        - paused
        - downloadTimeTaken
        - averageMbps
      properties:
        fileId:
          type: string
          description: ID of the file being downloaded
        modelId:
          type: string
          description: ID of the model being downloaded
        filename:
          type: string
          description: Name of the file being downloaded
        downloadedRatio:
          type: number
          description: Percentage of download completion (0-1)
        transferredBytes:
          type: number
          description: Number of bytes transferred
        totalBytes:
          type: number
          description: Total size of the file in bytes
        paused:
          type: boolean
          description: Whether the download is paused
        downloadTimeTaken:
          type: number
          description: Time taken for download in milliseconds
        averageMbps:
          type: number
          description: Average download speed in Mbps
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: UUID
      description: Enter your API key here

````