{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/worker-manager/v1/worker-pool-error-stats.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Total number of errors for given worker pool or all worker pools\nbroken down daily for the past 7 days, hourly for the past 24 hours.\nAlso includes breakdown by title and error code.\n",
  "properties": {
    "totals": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "additionalProperties": true,
          "description": "Breakdown by error code where available",
          "title": "By error code",
          "type": "object"
        },
        "daily": {
          "additionalProperties": true,
          "description": "Breakdown by day",
          "title": "Last 7 days",
          "type": "object"
        },
        "hourly": {
          "additionalProperties": true,
          "description": "Breakdown by hour",
          "title": "Last 24 hours",
          "type": "object"
        },
        "launchConfig": {
          "additionalProperties": true,
          "description": "Breakdown by launchConfigId where available",
          "title": "By launch config ID",
          "type": "object"
        },
        "title": {
          "additionalProperties": true,
          "description": "Breakdown by title",
          "title": "By error title",
          "type": "object"
        },
        "total": {
          "description": "Total number of errors",
          "title": "Total number of errors in the past 7 days",
          "type": "number"
        },
        "workerPool": {
          "additionalProperties": true,
          "description": "Breakdown by worker pool if workerPoolId is not specified.\nIf specified, this will only include the worker pool specified.\n",
          "title": "By worker pool",
          "type": "object"
        }
      },
      "required": [
        "total",
        "daily",
        "hourly",
        "title",
        "code",
        "launchConfig",
        "workerPool"
      ],
      "type": "object"
    },
    "workerPoolId": {
      "oneOf": [
        {
          "$ref": "worker-pool-full.json#/properties/workerPoolId"
        },
        {
          "const": ""
        }
      ]
    }
  },
  "required": [
    "workerPoolId",
    "totals"
  ],
  "title": "Worker Pool Error Stats",
  "type": "object"
}