Files

Download a file by its ID or return its content as a string/bytes.

Args: file_id: UUID of the file. current_user: Authenticated user. session: Database session. storage_service: File storage service. return_content: If True, return raw content (str) instead of StreamingResponse.

Returns: StreamingResponse for client downloads or str for internal use.

get/api/v2/files/{file_id}

Request

  • The document declares no server URL.
  • Auth
    • OAuth 2
      Password
      Token URL: api/v1/login
    • or API key in query parameter x-api-key
    • or API key in header x-api-key

Path parameters

file_idstring uuid required

Query parameters

return_contentboolean

Response

Successful Response

unknown required

Changes

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      the endpoint scheme security OAuth2PasswordBearerCookie was added to the API

    • info

      the endpoint scheme security OAuth2PasswordBearer was removed from the API