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

# List a state's subjects

> A keyset page of the subjects holding a record for the state, optionally one ``kind``.



## OpenAPI

````yaml /openapi.json get /api/states/{name}/subjects
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 14.0.2
servers: []
security: []
paths:
  /api/states/{name}/subjects:
    get:
      tags:
        - states
      summary: List a state's subjects
      description: >-
        A keyset page of the subjects holding a record for the state, optionally
        one ``kind``.
      operationId: get_api_states_name_subjects
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/StateSubjectsPage'
                required:
                  - data
                type: object
          description: Success.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    StateSubjectsPage:
      description: >-
        One keyset page of a state's subjects (``list_state_subjects``).
        ``next_cursor``

        is the cursor the next page reads from, ``null`` on the last page.
      properties:
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        subjects:
          items:
            $ref: '#/components/schemas/StateSubjectEntry'
          title: Subjects
          type: array
      required:
        - subjects
        - next_cursor
      title: StateSubjectsPage
      type: object
    Error:
      properties:
        code:
          description: >-
            Stable machine-readable reason a client keys a dedicated error state
            on, present on refusals that opt in (e.g. a 501 not-configured
            refusal). Optional: absent when the error carries only a
            human-readable message.
          type: string
        error:
          type: string
      required:
        - error
      type: object
    StateSubjectEntry:
      description: >-
        One subject holding a record for the state: its ``subject`` identity and
        the

        ``updated_at`` epoch seconds of its last write.
      properties:
        subject:
          $ref: '#/components/schemas/StateSubject'
        updated_at:
          title: Updated At
          type: number
      required:
        - subject
        - updated_at
      title: StateSubjectEntry
      type: object
    StateSubject:
      additionalProperties: false
      description: >-
        One addressed subject: the conversation-target scope

        ``(target_kind, target_name)`` plus the ``(kind, key)`` within it.


        Equality (and identity across every store method) is all four fields.
        ``key`` is

        stripped and must be 1..512 characters; ``kind`` matches
        :data:`SUBJECT_KIND_RE`.

        Frozen so a validated subject cannot be mutated after it is read back.
      properties:
        key:
          title: Key
          type: string
        kind:
          title: Kind
          type: string
        target_kind:
          enum:
            - agent
            - tool
          title: Target Kind
          type: string
        target_name:
          minLength: 1
          title: Target Name
          type: string
      required:
        - target_kind
        - target_name
        - kind
        - key
      title: StateSubject
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````