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

# Get a record's change history

> Pages one record's history events, newest first. No record-existence check — a deleted record's history is still readable. `mode` in the reply is the config's CURRENT history mode, which may be `none` if history was later turned off; any retained events are still returned. Once the set is deleted, root and admin can still read its kept history, and `mode` comes from the newest event.



## OpenAPI

````yaml /api-reference/endpoint/records/openapi.json get /records/{config_id}/{id}/history
openapi: 3.1.0
info:
  title: Records API
  version: 1.1.0
  description: >-
    Record configurations (schemas, views, versions) and the records that
    conform to them. Record IDs are server-generated, config IDs are
    client-supplied (`^[a-zA-Z0-9_-]+$`). Configs and records are updated with
    PUT: a config update applies only the fields sent, a record update merges
    `data`. Editing a config schema does not retroactively re-validate existing
    records. Publish a config version to snapshot the stored config; list and
    read versions to see its history.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Record Configs
    description: >-
      Manage record configuration schemas. Each configuration defines the
      structure (fields, types, validation rules) that records must conform to.
  - name: Records
    description: >-
      Manage individual data records. Each record belongs to exactly one
      configuration and its data is validated against that configuration's
      schema.
  - name: Record Config Collections
    description: Groups of record configs.
  - name: Record Config Versions
    description: Published snapshots of a record config.
  - name: Record History
    description: The change history of a record.
  - name: Record Assessment
  - name: Strategy and Simulation
  - name: Record Metrics
paths:
  /records/{config_id}/{id}/history:
    parameters:
      - name: config_id
        in: path
        required: true
        description: ID of the record configuration that the record belongs to
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: Record ID
        schema:
          type: string
    get:
      tags:
        - Record History
      summary: Get a record's change history
      description: >-
        Pages one record's history events, newest first. No record-existence
        check — a deleted record's history is still readable. `mode` in the
        reply is the config's CURRENT history mode, which may be `none` if
        history was later turned off; any retained events are still returned.
        Once the set is deleted, root and admin can still read its kept history,
        and `mode` comes from the newest event.
      operationId: getRecordHistory
      parameters:
        - name: limit
          in: query
          required: false
          description: Page size. Default 25, clamped to 100.
          schema:
            type: integer
            default: 25
            maximum: 100
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque next_cursor from a previous page. When set, `end` is ignored
            — the server resumes from the cursor.
          schema:
            type: string
        - name: start
          in: query
          required: false
          description: >-
            RFC3339 or YYYY-MM-DD (00:00Z that day). The server cannot bound
            reverse paging by a start time, so older events are dropped
            client-side and `next_cursor` is omitted once one is seen.
          schema:
            type: string
        - name: end
          in: query
          required: false
          description: >-
            RFC3339 or YYYY-MM-DD (end of that UTC day). Applied on the first
            page only — ignored once `cursor` is set.
          schema:
            type: string
      responses:
        '200':
          description: >-
            One page of history events, newest first. Snapshots are included in
            the list — there is no separate get-one-version endpoint.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response'
                  - properties:
                      body:
                        $ref: '#/components/schemas/RecordHistoryPage'
        '400':
          description: >-
            Missing config_id or id, an unparsable start/end, or
            `{"code":"invalid_cursor"}` when the supplied cursor is stale or
            malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Record configuration not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            `{"code":"history_read_failed"}` — the underlying stream read
            failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Response:
      type: object
      properties:
        status_code:
          type: integer
          description: HTTP status code echoed in the response body.
        body:
          type: object
          description: Response payload.
    RecordHistoryPage:
      type: object
      description: get.record-history reply, newest first.
      properties:
        config_id:
          type: string
        record_id:
          type: string
        mode:
          type: string
          enum:
            - none
            - audit
            - timeseries
          description: >-
            The config's CURRENT history mode, which may differ from the mode
            events in this page were written under.
        results:
          type: array
          items:
            $ref: '#/components/schemas/RecordHistoryEntry'
        results_total:
          type: integer
        next_cursor:
          type: string
          description: >-
            Opaque cursor for the next (older) page. Omitted once the page
            reaches `start` or the history is exhausted.
        amendments_truncated:
          type: boolean
          description: >-
            true when this record has more than 2000 amend/redact messages and
            only the newest 2000 were folded onto this page; a version corrected
            or hidden by an older amendment could read as untouched.
    ErrorResponse:
      type: object
      properties:
        status_code:
          type: integer
        body:
          type: object
          properties:
            error:
              type: string
              description: Human-readable error message.
      example:
        status_code: 400
        body:
          error: field 'rating' is required
    RecordHistoryEntry:
      type: object
      description: One event on a record's history.
      properties:
        sequence:
          type: integer
          description: Stream sequence number of this event.
        time:
          type: string
          format: date-time
          description: >-
            When the event was written (the stream message's own timestamp,
            RFC3339Nano).
        config_id:
          type: string
        record_id:
          type: string
        version:
          type: integer
          description: >-
            The record's version at this event. A delete event carries the
            record's version at the time of delete, plus one.
        op:
          type: string
          enum:
            - put
            - delete
        mode:
          type: string
          enum:
            - audit
            - timeseries
          description: The config's history mode at write time.
        actor:
          type: string
          description: >-
            User id from the write's own token; empty when the write carried
            none.
        effective_at:
          type: string
          format: date-time
          description: The time this value is about. Defaults to write time.
        config_updated_at:
          type: string
          description: >-
            The config's updated_at at write time, for detecting schema drift
            against a snapshot. Empty for events written before this field
            existed.
        snapshot:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            mode "audit": the full stored record, version included. mode
            "timeseries": {"<field>": <number>, ...} for series.fields only,
            omitting fields that were missing or non-numeric. null on a delete
            event, a hidden version or an erased version.
        reconstructed:
          type: boolean
          description: >-
            Always false in v1. Reserved for a future repair sweeper that
            re-derives a missed event from the record's stored version.
        restored_from:
          type: integer
          description: >-
            Present only on a put that restored an earlier version: the version
            its snapshot was copied from.
        hidden:
          type: boolean
          description: True once any redact targets this version.
        erased:
          type: boolean
          description: >-
            True once a redact with erased:true targets this version; its stored
            bytes are gone and snapshot is synthesised from the redact stub.
        hidden_by:
          type: string
          description: >-
            Actor of the redact with the highest sequence targeting this
            version. Present when hidden.
        hidden_at:
          type: string
          format: date-time
          description: That redact's write time. Present when hidden.
        hidden_reason:
          type: string
          description: That redact's reason. Present when hidden.
        amended_by:
          type: string
          description: >-
            Actor of the amend with the highest sequence targeting this version.
            Present only when edited and not hidden.
        amended_at:
          type: string
          format: date-time
          description: That amend's write time. Present only when edited and not hidden.
        amend_reason:
          type: string
          description: That amend's reason. Present only when edited and not hidden.
        original_snapshot:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: >-
            The put's own snapshot before the winning amend replaced it. Present
            only when edited and not hidden.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.