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

# Index of a day

> The rows the kept tier took on a UTC day, with the digests that make the `turns.root` of the `audit.root` event, for your own audit chain.



## OpenAPI

````yaml openapi/en/cell.json GET /v1/turns/index/{day}
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/turns/index/{day}:
    get:
      tags:
        - turns
      summary: Index of a day
      description: >-
        The rows the kept tier took on a UTC day with their digests, which make
        the `turns.root` of the day's

        `audit.root` event: the company anchors them in its own audit chain.


        **Authentication.** Source key with the `replay` scope, or a Console
        person token with the `integration`, `security` role (or admin). It
        answers only in a space with the `turns` feature on (the `features`
        document); in a space without it, 404.
      operationId: turn_index_v1_turns_index__day__get
      parameters:
        - in: path
          name: day
          required: true
          schema:
            format: date
            title: Day
            type: string
        - in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
                type: string
              - type: 'null'
            title: Cursor
        - in: query
          name: limit
          required: false
          schema:
            default: 500
            maximum: 1000
            minimum: 1
            title: Limit
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TurnIndexPage'
          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:
    TurnIndexPage:
      additionalProperties: false
      description: >-
        The rows the kept tier took on one UTC day, in turn id order. Their
        digests, as leaves in that

        order, make the `turns.root` of the day's `audit.root` event (RFC 6962
        prefixes, an odd node carried

        up), for the company's own audit chain to anchor.
      properties:
        day:
          format: date
          title: Day
          type: string
        items:
          items:
            $ref: '#/components/schemas/TurnIndexEntry'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      required:
        - day
        - items
      title: TurnIndexPage
      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
    TurnIndexEntry:
      additionalProperties: false
      description: >-
        One row of the kept tier's index, as the day's anchored root counts it:
        ids, times, the build and the

        mode, never what the turn said. `digest` is SHA-256 over the RFC 8785
        form of the other fields.
      properties:
        agent:
          maxLength: 256
          minLength: 1
          title: Agent
          type: string
        build_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Build Hash
        content_mode:
          enum:
            - stored
            - pointer
            - hash_only
          title: Content Mode
          type: string
        digest:
          pattern: ^sha256:[0-9a-f]{64}$
          title: Digest
          type: string
        kept_at:
          format: date-time
          title: Kept At
          type: string
        kind:
          enum:
            - message
            - action
            - event
            - timer
          title: Kind
          type: string
        source_id:
          maxLength: 512
          minLength: 1
          title: Source Id
          type: string
        started_at:
          format: date-time
          title: Started At
          type: string
        turn_id:
          pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
          title: Turn Id
          type: string
      required:
        - turn_id
        - source_id
        - agent
        - kind
        - started_at
        - content_mode
        - kept_at
        - digest
      title: TurnIndexEntry
      type: object
  securitySchemes:
    sourceKey:
      type: http
      scheme: bearer
      description: nia_sk_...
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````