> ## 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.

# List Collection Files

> List collection files with cursor pagination.



## OpenAPI

````yaml https://www.datalab.to/openapi.json get /api/v1/collections/{collection_id}/files
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/collections/{collection_id}/files:
    get:
      tags:
        - collections
      summary: List Collection Files
      description: List collection files with cursor pagination.
      operationId: list_collection_files_api_v1_collections__collection_id__files_get
      parameters:
        - name: collection_id
          in: path
          required: true
          schema:
            type: integer
            title: Collection Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 50
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - 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/CollectionFilesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CollectionFilesResponse:
      properties:
        files:
          items:
            $ref: '#/components/schemas/CollectionFileResponse'
          type: array
          title: Files
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - files
        - total
        - limit
        - has_more
      title: CollectionFilesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CollectionFileResponse:
      properties:
        uploaded_file_id:
          type: integer
          title: Uploaded File Id
        original_filename:
          type: string
          title: Original Filename
        file_size:
          type: integer
          title: File Size
        content_type:
          type: string
          title: Content Type
        sort_order:
          type: integer
          title: Sort Order
        source_type:
          type: string
          enum:
            - upload
            - s3
          title: Source Type
          default: upload
        external_key:
          anyOf:
            - type: string
            - type: 'null'
          title: External Key
        external_etag:
          anyOf:
            - type: string
            - type: 'null'
          title: External Etag
        external_last_modified:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: External Last Modified
        external_deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: External Deleted At
        last_eval_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Eval Score
        last_score_breakdown:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Last Score Breakdown
      type: object
      required:
        - uploaded_file_id
        - original_filename
        - file_size
        - content_type
        - sort_order
      title: CollectionFileResponse
    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

````