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

# Reference data freshness

> Report the freshness of every reference data source and what is currently installed in each collection built from them. Restricted to the platform organization.

Each source carries its declared refresh cadence, when its newest usable data was obtained, how old that data is, how much it moved since the previous snapshot, and a server-computed status. The status is the same judgement the monitoring alerts use, so a source reported as `stale` or `failed` here is already alerting.



## OpenAPI

````yaml /openapi.json get /admin/reference/status
openapi: 3.1.0
info:
  title: GetDialed API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/v1
    description: Production
security: []
paths:
  /admin/reference/status:
    get:
      tags:
        - reference-data
      summary: Reference data freshness
      description: >-
        Report the freshness of every reference data source and what is
        currently installed in each collection built from them. Restricted to
        the platform organization.


        Each source carries its declared refresh cadence, when its newest usable
        data was obtained, how old that data is, how much it moved since the
        previous snapshot, and a server-computed status. The status is the same
        judgement the monitoring alerts use, so a source reported as `stale` or
        `failed` here is already alerting.
      operationId: get_reference_status_admin_reference_status_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferenceStatusResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '404':
          description: >-
            The surface is not available to this organization (returned instead
            of a 403, so the answer does not depend on whether the surface
            exists)
          content:
            application/json:
              example:
                detail: Not found
        '422':
          description: The request failed validation
          content:
            application/json:
              example:
                detail: Validation error
        '429':
          description: Rate limit exceeded — retry after the Retry-After header
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
          content:
            application/json:
              example:
                detail: 'Rate limit exceeded: 100 per 1 minute'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ReferenceStatusResponse:
      properties:
        sources:
          items:
            $ref: '#/components/schemas/ReferenceSourceStatus'
          type: array
          title: Sources
          description: >-
            One entry per declared source, always — including a source that has
            never loaded. A source is never omitted, because an omitted source
            is one nobody notices has broken.
        collections:
          additionalProperties:
            $ref: '#/components/schemas/ReferenceCollectionStatus'
          type: object
          title: Collections
          description: >-
            What is live in each derived collection, keyed by collection name.
            The key set is declared server-side and is the same on every
            response.
      type: object
      required:
        - sources
        - collections
      title: ReferenceStatusResponse
      description: >-
        Reference data freshness: every source, and every collection built from
        them.
    ReferenceSourceStatus:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Stable identifier for the source, named for what it supplies (for
            example `exchange_geography`).
        cadence_seconds:
          type: integer
          title: Cadence Seconds
          description: >-
            How often this source is expected to refresh. The freshness
            thresholds are multiples of this value, not fixed day counts.
        mode:
          type: string
          enum:
            - scheduled
            - manual
          title: Mode
          description: >-
            `scheduled` when the source refreshes on its own schedule; `manual`
            when a new release has to be supplied by an operator. A manual
            source still ages and still goes stale — that is how the card asks
            for the upload.
        last_success_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Success At
          description: >-
            When the newest usable data for this source was obtained. This dates
            the DATA, not the run: a refresh that succeeded by reusing the
            previous file does not move this timestamp.
        last_attempt_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Attempt At
          description: >-
            When this source was last attempted, successfully or not. Equal to
            `last_success_at` on a healthy source.
        age_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Age Seconds
          description: >-
            Age of the newest usable data, in seconds. Null when the source has
            never produced usable data.
        status:
          type: string
          enum:
            - fresh
            - aging
            - stale
            - failed
          title: Status
          description: >-
            `fresh` within one cadence, `aging` between one and two, `stale`
            beyond two or when the last load failed validation, and `failed`
            when the last attempt errored outright. A `stale` or `failed` source
            also raises an alert, so this value is never only a colour.
        drift:
          $ref: '#/components/schemas/ReferenceSourceDrift'
          description: How much the source moved between its two most recent snapshots.
      type: object
      required:
        - id
        - cadence_seconds
        - mode
        - status
        - drift
      title: ReferenceSourceStatus
      description: |-
        Freshness of one reference data source.

        The ``status`` is computed on the server from the source's own declared
        cadence, so this field and the alert that pages an operator are the same
        judgement rather than two implementations that can disagree.
    ReferenceCollectionStatus:
      properties:
        live_snapshot_ids:
          items:
            type: string
          type: array
          title: Live Snapshot Ids
          description: >-
            The snapshots the live corpus was built from. Empty when nothing has
            been installed yet.
        swapped_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Swapped At
          description: >-
            When the live corpus was last replaced. Null when nothing has been
            installed yet.
        doc_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Doc Count
          description: >-
            How many records the live corpus holds. Null when nothing has been
            installed yet.
      type: object
      title: ReferenceCollectionStatus
      description: |-
        What is currently installed in one derived reference collection.

        Describes the LIVE corpus. A refresh that failed validation leaves the
        previous corpus serving untouched, so these three values keep describing
        that corpus rather than the attempt that did not install.
    ReferenceSourceDrift:
      properties:
        row_count_delta:
          anyOf:
            - type: integer
            - type: 'null'
          title: Row Count Delta
          description: >-
            Rows gained (positive) or lost (negative) versus the previous
            snapshot, summed across the files that make up the source. Null when
            there is no previous snapshot to compare against.
        changed_keys:
          anyOf:
            - type: integer
            - type: 'null'
          title: Changed Keys
          description: >-
            How many keys changed value between the previous corpus and the one
            currently installed. Null when the comparison was not made.
      type: object
      title: ReferenceSourceDrift
      description: >-
        How much a source moved between its two most recent snapshots.


        ``null`` and ``0`` are DIFFERENT answers and both are reported as such:

        ``null`` means "unknown — there is nothing earlier to compare against",

        while ``0`` means "measured, and nothing moved". Collapsing the first
        into

        the second would make a brand-new source look like a perfectly stable
        one.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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