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

# Evaluate an input-purpose template_jq program for a subject

> An ``input``-purpose ``template_jq`` program's result for one subject — its jq over the
subject's record. ``params`` supplies the program's declared parameters. ``program`` may be
unqualified or ``<template>.<name>``. An unknown program (or a subject with no attachment
declaring it) is a 404; an ambiguous unqualified name, an ``update``-purpose name, an
undeclared param or a program that fails to evaluate is a 422. Read-only.



## OpenAPI

````yaml /openapi.json get /api/states/{name}/records/{target_kind}/{target_name}/{kind}/{key}/template-jq/{program}
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}/records/{target_kind}/{target_name}/{kind}/{key}/template-jq/{program}:
    get:
      tags:
        - states
      summary: Evaluate an input-purpose template_jq program for a subject
      description: >-
        An ``input``-purpose ``template_jq`` program's result for one subject —
        its jq over the

        subject's record. ``params`` supplies the program's declared parameters.
        ``program`` may be

        unqualified or ``<template>.<name>``. An unknown program (or a subject
        with no attachment

        declaring it) is a 404; an ambiguous unqualified name, an
        ``update``-purpose name, an

        undeclared param or a program that fails to evaluate is a 422.
        Read-only.
      operationId: >-
        get_api_states_name_records_target_kind_target_name_kind_key_template_jq_program
      parameters:
        - in: path
          name: name
          required: true
          schema:
            type: string
        - in: path
          name: target_kind
          required: true
          schema:
            type: string
        - in: path
          name: target_name
          required: true
          schema:
            type: string
        - in: path
          name: kind
          required: true
          schema:
            type: string
        - in: path
          name: key
          required: true
          schema:
            type: string
        - in: path
          name: program
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/TemplateJqResult'
                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.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Request failed validation.
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TemplateJqResult:
      additionalProperties: false
      description: >-
        The result of evaluating an ``input``-purpose ``template_jq`` program
        for a subject:

        the resolved ``name``, its ``purpose`` (always ``"input"`` here), and
        the ``value`` (any

        JSON — the program's jq output over the subject's record). A read; no
        write is

        recorded.
      properties:
        name:
          title: Name
          type: string
        purpose:
          const: input
          default: input
          title: Purpose
          type: string
        value:
          default: null
          title: Value
      required:
        - name
      title: TemplateJqResult
      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
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````