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

# List Records

> List records in a collection.

Supports pagination, sorting, and filtering.



## OpenAPI

````yaml get /api/v1/records/{collection}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/records/{collection}:
    get:
      tags:
        - records
      summary: List Records
      description: |-
        List records in a collection.

        Supports pagination, sorting, and filtering.
      operationId: list_records_api_v1_records__collection__get
      parameters:
        - name: collection
          in: path
          required: true
          schema:
            type: string
            title: Collection
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 30
            title: Limit
        - name: sort
          in: query
          required: false
          schema:
            type: string
            default: '-created_at'
            title: Sort
        - name: fields
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Fields
        - name: filter
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Filter
        - name: expand
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Expand
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: cursor_before
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor Before
        - name: include_count
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Count
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/RecordListResponse'
                  - $ref: '#/components/schemas/CursorListResponse'
                title: Response List Records Api V1 Records  Collection  Get
        '401':
          description: Authentication required
        '403':
          description: Permission denied
        '404':
          description: Collection not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RecordListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RecordResponse'
          type: array
          title: Items
          description: List of records
        total:
          type: integer
          title: Total
          description: Total number of records matching filter
        skip:
          type: integer
          title: Skip
          description: Number of records skipped
        limit:
          type: integer
          title: Limit
          description: Number of records returned
      type: object
      required:
        - items
        - total
        - skip
        - limit
      title: RecordListResponse
      description: Response for listing records.
    CursorListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RecordResponse'
          type: array
          title: Items
          description: List of records
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor for next page (null if no more records)
        prev_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Prev Cursor
          description: Cursor for previous page (null if first page)
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more records after this page
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: Total count (only included if include_count=true)
      type: object
      required:
        - items
        - has_more
      title: CursorListResponse
      description: Response for cursor-based pagination.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RecordResponse:
      properties:
        id:
          type: string
          title: Id
          description: Record ID (UUID)
        account_id:
          type: string
          title: Account Id
          description: Account ID the record belongs to
        created_at:
          type: string
          title: Created At
          description: ISO 8601 timestamp when record was created
        created_by:
          type: string
          title: Created By
          description: User ID who created the record
        updated_at:
          type: string
          title: Updated At
          description: ISO 8601 timestamp when record was last updated
        updated_by:
          type: string
          title: Updated By
          description: User ID who last updated the record
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Name
          description: Display name for the account (optional)
      additionalProperties: true
      type: object
      required:
        - id
        - account_id
        - created_at
        - created_by
        - updated_at
        - updated_by
      title: RecordResponse
      description: |-
        Response for a created or retrieved record.

        Contains all system fields plus user-defined fields.
    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

````