> ## 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 hook runs

> Kept hook runs, with the outstanding and failed totals; never their payloads.

``status`` ``outstanding`` lists the pending and running runs, the soonest due first;
``failed`` the failed runs, the most recently failed first; none lists both, outstanding
first. A page holds at most ``limit`` runs; ``cursor`` continues from a page's ``next_cursor``.



## OpenAPI

````yaml /openapi.json get /api/hook-runs
openapi: 3.1.0
info:
  description: >-
    The operator HTTP surface served under /api/*. The platform's core routes.
    Plugin routes are published by each plugin.
  title: tai42-skeleton API
  version: 28.0.0
servers: []
security: []
paths:
  /api/hook-runs:
    get:
      tags:
        - hooks
      summary: List hook runs
      description: >-
        Kept hook runs, with the outstanding and failed totals; never their
        payloads.


        ``status`` ``outstanding`` lists the pending and running runs, the
        soonest due first;

        ``failed`` the failed runs, the most recently failed first; none lists
        both, outstanding

        first. A page holds at most ``limit`` runs; ``cursor`` continues from a
        page's ``next_cursor``.
      operationId: get_api_hook_runs
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/HookRunsPage'
                required:
                  - data
                type: object
          description: Success.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Request failed validation.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    HookRunsPage:
      description: >-
        One page of hook runs with the totals of every outstanding and every
        failed run.


        Outstanding runs come first, the soonest due first; failed runs follow,
        the most recently

        failed first. ``next_cursor`` is the cursor the next page reads from,
        ``null`` on the last page.
      properties:
        failed:
          title: Failed
          type: integer
        items:
          items:
            $ref: '#/components/schemas/HookRunView'
          title: Items
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        outstanding:
          title: Outstanding
          type: integer
      required:
        - items
        - next_cursor
        - outstanding
        - failed
      title: HookRunsPage
      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
    HookRunView:
      description: >-
        One kept hook run, without its event payload or its start spec (either
        may carry secrets of the sender).


        ``status`` is ``pending`` (due at ``next_attempt_at``), ``running`` (an
        attempt holds its lease) or

        ``failed`` (held until an operator retries or discards it). ``acted``
        says whether and how the

        hook acted on its parked entries: ``""`` not at all, ``start`` started
        its tool, ``cancel``,

        ``resume`` or ``take`` on ``acted_ids``. ``claim_intent`` is set while a
        claim is still to be

        settled, and on a failed run whose claim could not be told.
      properties:
        acted:
          enum:
            - ''
            - start
            - cancel
            - resume
            - take
          title: Acted
          type: string
        acted_ids:
          items:
            type: string
          title: Acted Ids
          type: array
        attempts:
          title: Attempts
          type: integer
        claim_intent:
          anyOf:
            - $ref: '#/components/schemas/HookRunClaimIntentView'
            - type: 'null'
        created_at:
          format: date-time
          title: Created At
          type: string
        failed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Failed At
        hook:
          title: Hook
          type: string
        id:
          title: Id
          type: string
        last_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error
        last_error_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error Kind
        next_attempt_at:
          format: date-time
          title: Next Attempt At
          type: string
        status:
          enum:
            - pending
            - running
            - failed
          title: Status
          type: string
        topic:
          title: Topic
          type: string
      required:
        - id
        - topic
        - hook
        - status
        - attempts
        - next_attempt_at
        - acted
        - acted_ids
        - claim_intent
        - last_error
        - last_error_kind
        - created_at
        - failed_at
      title: HookRunView
      type: object
    HookRunClaimIntentView:
      description: A resume or take claim a hook run's hook announced and did not confirm.
      properties:
        action:
          enum:
            - resume
            - take
          title: Action
          type: string
        ids:
          items:
            type: string
          title: Ids
          type: array
      required:
        - action
        - ids
      title: HookRunClaimIntentView
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````

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