{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elastic/json-schema/elastic-types-shard-statistics-schema.json",
  "title": "_types.ShardStatistics",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elastic-ccr-api-openapi.yml#/components/schemas/_types.ShardStatistics",
  "type": "object",
  "properties": {
    "failed": {
      "description": "The number of shards the operation or search attempted to run on but failed.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.uint"
        }
      ]
    },
    "successful": {
      "description": "The number of shards the operation or search succeeded on.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.uint"
        }
      ]
    },
    "total": {
      "description": "The number of shards the operation or search will run on overall.",
      "allOf": [
        {
          "$ref": "#/$defs/_types.uint"
        }
      ]
    },
    "failures": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/_types.ShardFailure"
      }
    },
    "skipped": {
      "allOf": [
        {
          "$ref": "#/$defs/_types.uint"
        }
      ]
    }
  },
  "required": [
    "failed",
    "successful",
    "total"
  ],
  "$defs": {
    "_types.ErrorCause": {
      "description": "Cause and details about a request failure. This class defines the properties common to all error types.\nAdditional details are also provided, that depend on the error type.",
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of error",
          "type": "string"
        },
        "reason": {
          "description": "A human-readable explanation of the error, in English.",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": [
                "string",
                "null"
              ]
            }
          ]
        },
        "stack_trace": {
          "description": "The server stack trace. Present only if the `error_trace=true` parameter was sent with the request.",
          "type": "string"
        },
        "caused_by": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ErrorCause"
            }
          ]
        },
        "root_cause": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ErrorCause"
          }
        },
        "suppressed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/_types.ErrorCause"
          }
        }
      },
      "required": [
        "type"
      ]
    },
    "_types.IndexName": {
      "type": "string"
    },
    "_types.ShardFailure": {
      "type": "object",
      "properties": {
        "index": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.IndexName"
            }
          ]
        },
        "node": {
          "type": "string"
        },
        "reason": {
          "allOf": [
            {
              "$ref": "#/$defs/_types.ErrorCause"
            }
          ]
        },
        "shard": {
          "type": "number"
        },
        "status": {
          "type": "string"
        },
        "primary": {
          "type": "boolean"
        }
      },
      "required": [
        "reason"
      ]
    },
    "_types.uint": {
      "type": "number"
    }
  }
}