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

# Get Job Statistics

> Get aggregate statistics across all jobs.

**Authentication Required**: Requires `job:read` permission.
Includes counts by status and type, recent completions, and averages.



## OpenAPI

````yaml /openapi/merchantops-public.json get /api/jobs/stats
openapi: 3.1.0
info:
  description: >-
    Public API for the MerchantOps product catalog, pricing, and publishing
    surface.
  title: MerchantOps API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.merchantops.ai
security: []
paths:
  /api/jobs/stats:
    get:
      tags:
        - Jobs
      summary: Get Job Statistics
      description: |-
        Get aggregate statistics across all jobs.

        **Authentication Required**: Requires `job:read` permission.
        Includes counts by status and type, recent completions, and averages.
      operationId: get_job_statistics
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: X-Organization-ID
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Organization-Id
        - in: cookie
          name: stytch_session
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Stytch Session
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/merchantops_server__api__routers__jobs__JobStatsResponse
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    merchantops_server__api__routers__jobs__JobStatsResponse:
      description: Response model for job statistics.
      properties:
        average_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          description: Average job duration
          title: Average Duration Seconds
        average_success_rate:
          anyOf:
            - type: number
            - type: 'null'
          description: Average success rate
          title: Average Success Rate
        by_status:
          additionalProperties:
            type: integer
          description: Count by status
          title: By Status
          type: object
        by_type:
          additionalProperties:
            type: integer
          description: Count by type
          title: By Type
          type: object
        recent_completions:
          description: Jobs completed in last 24h
          title: Recent Completions
          type: integer
        total_jobs:
          description: Total number of jobs
          title: Total Jobs
          type: integer
      required:
        - total_jobs
        - by_status
        - by_type
        - recent_completions
      title: JobsJobStatsResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````