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

# Get File Metadata

> Get metadata for an uploaded file.

Returns file information including size, content type, and upload timestamp.



## OpenAPI

````yaml https://www.datalab.to/openapi.json get /api/v1/files/{file_id}
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/files/{file_id}:
    get:
      tags:
        - files
      summary: Get File Metadata
      description: >-
        Get metadata for an uploaded file.


        Returns file information including size, content type, and upload
        timestamp.
      operationId: get_file_metadata_api_v1_files__file_id__get
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: integer
            title: File Id
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileMetadataResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    FileMetadataResponse:
      properties:
        file_id:
          type: integer
          title: File Id
          description: Unique file ID
        original_filename:
          type: string
          title: Original Filename
          description: Original filename
        content_type:
          type: string
          title: Content Type
          description: MIME type
        file_size:
          type: integer
          title: File Size
          description: File size in bytes
        upload_status:
          type: string
          title: Upload Status
          description: 'Upload status: pending, completed, or failed'
        created:
          type: string
          format: date-time
          title: Created
          description: Upload timestamp
        reference:
          type: string
          title: Reference
          description: File reference in datalab://file-{id} format
      type: object
      required:
        - file_id
        - original_filename
        - content_type
        - file_size
        - upload_status
        - created
        - reference
      title: FileMetadataResponse
      description: Response with file metadata.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````