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

# Fact history

> Every value the slot of a fact held, with validity, origin and the edges between them.



## OpenAPI

````yaml openapi/en/cell.json GET /v1/profiles/{profile_id}/facts/{fact_id}/history
openapi: 3.1.0
info:
  title: Niadra data API
  version: '1'
  description: >-
    Writing, context, history, objects, identity, privacy and governance of one
    space. Every space has a stable address, with the space and the region in
    its name.
servers:
  - url: https://{space}.{region}.api.niadra.com
    variables:
      space:
        default: acme-prod
        description: The space, which comes in the source key.
      region:
        default: us-east-2
        description: The region of the space, which also comes in the key.
security: []
paths:
  /v1/profiles/{profile_id}/facts/{fact_id}/history:
    get:
      tags:
        - governance
      summary: Fact history
      description: >-
        What a fact's slot held before and after it: the values, when each held,
        where each came from.


        **Authentication.** Console person token with the `security`, `review`,
        `analysis` role (or admin), or a source key with the `admin` scope.
      operationId: fact_history_v1_profiles__profile_id__facts__fact_id__history_get
      parameters:
        - in: path
          name: profile_id
          required: true
          schema:
            format: uuid
            title: Profile Id
            type: string
        - in: path
          name: fact_id
          required: true
          schema:
            format: uuid
            title: Fact Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactHistory'
          description: Successful Response
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - sourceKey: []
        - personToken: []
components:
  schemas:
    FactHistory:
      additionalProperties: false
      description: >-
        `GET /v1/profiles/{profile_id}/facts/{fact_id}/history`: every value one
        slot held (the predicate,

        on the same handle and object), oldest first, with the edges between
        them, under the reader's policy.
      properties:
        fact_id:
          title: Fact Id
          type: string
        policy_version:
          title: Policy Version
          type: string
        predicate:
          title: Predicate
          type: string
        profile_id:
          title: Profile Id
          type: string
        relations:
          items:
            $ref: '#/components/schemas/FactRelationOut'
          title: Relations
          type: array
        versions:
          items:
            $ref: '#/components/schemas/FactOut'
          title: Versions
          type: array
        withheld:
          additionalProperties:
            type: integer
          description: Versions left out, by reason.
          title: Withheld
          type: object
      required:
        - profile_id
        - fact_id
        - predicate
        - policy_version
      title: FactHistory
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    FactRelationOut:
      additionalProperties: false
      properties:
        from_fact_id:
          description: The newer fact.
          title: From Fact Id
          type: string
        origin:
          default: model
          description: >-
            Who drew the edge: the extraction's `model`, a deterministic `rule`
            (precedence, a correction) or the nightly similarity `band`, whose
            edges only warn.
          enum:
            - model
            - rule
            - band
          title: Origin
          type: string
        to_fact_id:
          title: To Fact Id
          type: string
        type:
          description: '`supersedes` when a value replaced another, `contradicts`, ...'
          title: Type
          type: string
      required:
        - from_fact_id
        - to_fact_id
        - type
      title: FactRelationOut
      type: object
    FactOut:
      additionalProperties: false
      properties:
        about_handle_id:
          anyOf:
            - type: string
            - type: 'null'
          title: About Handle Id
        category:
          title: Category
          type: string
        confidence:
          title: Confidence
          type: number
        contradicts:
          description: Facts in conflict with this one, with who found the conflict.
          items:
            $ref: '#/components/schemas/FactContradictionOut'
          title: Contradicts
          type: array
        evidence_event_ids:
          items:
            type: string
          title: Evidence Event Ids
          type: array
        id:
          title: Id
          type: string
        invalid_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Invalid At
        last_confirmed_at:
          format: date-time
          title: Last Confirmed At
          type: string
        masked:
          default: false
          title: Masked
          type: boolean
        object:
          anyOf:
            - $ref: '#/components/schemas/ObjectRef'
            - type: 'null'
        origin:
          anyOf:
            - $ref: '#/components/schemas/Origin'
            - type: 'null'
          description: The earliest evidence event.
        predicate:
          title: Predicate
          type: string
        sensitivity:
          $ref: '#/components/schemas/Sensitivity'
        sessions_seen:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Distinct conversations or tasks whose turns support the value, which
            is what confirms it; `times_seen` counts every new piece of
            evidence. Null on an older fact not counted yet.
          title: Sessions Seen
        status:
          $ref: '#/components/schemas/FactStatus'
        times_seen:
          title: Times Seen
          type: integer
        unconfirmed_link:
          default: false
          description: >-
            It came through an identifier joined to the profile by a claim
            nobody confirmed yet (`HandleOut.provisional`). Only the `admin` and
            `security` roles see such items; every other reader, agents
            included, gets the profile without them until the link is confirmed.
          title: Unconfirmed Link
          type: boolean
        valid_at:
          format: date-time
          title: Valid At
          type: string
        value:
          anyOf:
            - type: string
            - type: 'null'
          description: None when the policy masks it for this reader.
          title: Value
      required:
        - id
        - predicate
        - value
        - category
        - sensitivity
        - status
        - confidence
        - valid_at
        - last_confirmed_at
        - times_seen
      title: FactOut
      type: object
    FactContradictionOut:
      additionalProperties: false
      properties:
        fact_id:
          description: The other fact of the pair.
          title: Fact Id
          type: string
        live:
          description: >-
            Both facts are still active. Retracting or correcting either one
            closes the pair.
          title: Live
          type: boolean
        origin:
          description: >-
            `model` when the extraction marked the conflict; `band` when the
            nightly comparison of the facts of one predicate found it, without a
            model. A `band` pair is a warning for review: it never changes a
            status, and each fact weighs less in the context while the pair is
            live.
          enum:
            - model
            - rule
            - band
          title: Origin
          type: string
      required:
        - fact_id
        - origin
        - live
      title: FactContradictionOut
      type: object
      description: A fact in conflict with the one read, and who found the conflict.
    ObjectRef:
      additionalProperties: false
      description: >-
        A business object in a system of record, e.g. `invoice` / `erp` /
        `0823`.
      properties:
        id:
          maxLength: 512
          minLength: 1
          title: Id
          type: string
          description: The id in that system.
        namespace:
          maxLength: 256
          minLength: 1
          title: Namespace
          type: string
          description: The system it lives in, such as `erp`.
        type:
          maxLength: 256
          minLength: 1
          title: Type
          type: string
          description: Object type, such as `invoice`, `order` or `ticket`.
      required:
        - type
        - namespace
        - id
      title: ObjectRef
      type: object
    Origin:
      additionalProperties: false
      description: >-
        Provenance of an item: the event it came from, its source (agent or
        system), channel and time.
      properties:
        at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: At
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Id
        event_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Id
        kind:
          anyOf:
            - $ref: '#/components/schemas/EventKind'
            - type: 'null'
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        speaker:
          anyOf:
            - $ref: '#/components/schemas/Speaker'
            - type: 'null'
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
      title: Origin
      type: object
    Sensitivity:
      enum:
        - normal
        - restricted
        - sensitive
      title: Sensitivity
      type: string
    FactStatus:
      enum:
        - active
        - expired
        - quarantined
        - retracted
      title: FactStatus
      type: string
    EventKind:
      enum:
        - message
        - system_event
        - action
      title: EventKind
      type: string
      description: >-
        What an event records: something said, a change in a system of record,
        or what an agent did in a system.
    Speaker:
      enum:
        - customer
        - ai_agent
        - human_agent
        - system
      title: Speaker
      type: string
      description: Who produced the event.
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````