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

# Newest durable scheduler enqueue attempts for one periodic entry.

> Bounded to the newest 100 records per schedule and ordered newest first. History
survives schedule deletion. `enqueued` means the Store confirmed the exact job
is durable and includes an idempotent same-ID replay; `deduplicated` is a unique
key or changed-content ID collision. Reasons are stable classifications and never
raw backend errors or payloads.




## OpenAPI

````yaml /api/headgate.openapi.yaml get /periodic/{id}/enqueue-events
openapi: 3.1.0
info:
  title: headgate control API
  version: 0.1.0
  description: >
    The web UI is one client of this control API and gets no

    privileged access — asynqmon reads Redis directly, which is why its
    compatibility

    note is three minor versions stale.


    Both the Go and Rust implementations serve this spec, and the conformance
    suite

    asserts identical responses. Every list endpoint is bounded to prevent
    inspection

    from becoming an unbounded store operation: asynq's

    GetQueueInfo is O(number of groups) and has pinned Redis CPU for seconds in

    production. Monitoring caused the outage.


    DERIVED FROM THE ARCHITECTURE, NOT FROM A PREDECESSOR'S UI. The first draft
    of this

    spec was the asynq Inspector surface -- list by state, act on one job, pause
    a queue

    -- with new nouns bolted on. That inherited three problems: it omitted bulk

    operations, history, and enqueue (which asynq and apalis-board respectively
    DO have),

    and more importantly it had no endpoint for the question this system's own
    design

    creates. When dequeue is an admission decision, the operator's first
    question is not

    "what is in the queue" but "why is THIS job not running" -- see
    /jobs/{id}/admission.

    No predecessor needs that endpoint because no predecessor has a gate.
servers:
  - url: /api/v1
security: []
paths:
  /periodic/{id}/enqueue-events:
    get:
      summary: Newest durable scheduler enqueue attempts for one periodic entry.
      description: >
        Bounded to the newest 100 records per schedule and ordered newest first.
        History

        survives schedule deletion. `enqueued` means the Store confirmed the
        exact job

        is durable and includes an idempotent same-ID replay; `deduplicated` is
        a unique

        key or changed-content ID collision. Reasons are stable classifications
        and never

        raw backend errors or payloads.
      parameters:
        - $ref: '#/components/parameters/Id'
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
        - name: cursor
          in: query
          description: Opaque event id returned by the previous page.
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: Newest first.
          content:
            application/json:
              schema:
                type: object
                required:
                  - events
                  - next_cursor
                properties:
                  next_cursor:
                    type: integer
                    nullable: true
                  events:
                    type: array
                    items:
                      type: object
                      required:
                        - event_id
                        - schedule_id
                        - tick_ms
                        - job_id
                        - outcome
                        - reason
                        - recorded_at_ms
                      properties:
                        event_id:
                          type: integer
                        schedule_id:
                          type: string
                        tick_ms:
                          type: integer
                        job_id:
                          type: string
                        outcome:
                          type: string
                          enum:
                            - enqueued
                            - deduplicated
                            - failed
                            - skipped
                        reason:
                          type: string
                          maxLength: 64
                        recorded_at_ms:
                          type: integer
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string

````