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

# Get Job Statistics

> Get aggregate job counts by status.

Returns counts for all statuses (pending, running, completed, failed,
retrying, dead) and computed metrics (avg_duration_seconds, failure_rate).
Counts are live snapshots from the database.



## OpenAPI

````yaml get /api/v1/admin/jobs/stats
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/admin/jobs/stats:
    get:
      tags:
        - admin
        - jobs
        - Jobs
      summary: Get Job Stats
      description: >-
        Get aggregate job counts by status.


        Returns counts for all statuses (pending, running, completed, failed,

        retrying, dead) and computed metrics (avg_duration_seconds,
        failure_rate).

        Counts are live snapshots from the database.
      operationId: get_job_stats_api_v1_admin_jobs_stats_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatsResponse'
components:
  schemas:
    JobStatsResponse:
      properties:
        pending:
          type: integer
          title: Pending
        running:
          type: integer
          title: Running
        completed:
          type: integer
          title: Completed
        failed:
          type: integer
          title: Failed
        retrying:
          type: integer
          title: Retrying
        dead:
          type: integer
          title: Dead
        avg_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Duration Seconds
        failure_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Failure Rate
      type: object
      required:
        - pending
        - running
        - completed
        - failed
        - retrying
        - dead
        - avg_duration_seconds
        - failure_rate
      title: JobStatsResponse
      description: Aggregate job statistics grouped by status.

````