{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-recaptcha/json-schema/google-recaptcha-google-cloud-recaptchaenterprise-v1-metrics-schema.json",
  "title": "GoogleCloudRecaptchaenterpriseV1Metrics",
  "description": "Metrics for a single Key.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-recaptcha-projects-api-openapi.yml#/components/schemas/GoogleCloudRecaptchaenterpriseV1Metrics",
  "properties": {
    "startTime": {
      "type": "string",
      "description": "Inclusive start time aligned to a day in the America/Los_Angeles (Pacific) timezone.",
      "format": "google-datetime"
    },
    "name": {
      "readOnly": true,
      "description": "Output only. Identifier. The name of the metrics, in the format `projects/{project}/keys/{key}/metrics`.",
      "type": "string"
    },
    "scoreMetrics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1ScoreMetrics"
      },
      "description": "Metrics are continuous and in order by dates, and in the granularity of day. All Key types should have score-based data."
    },
    "challengeMetrics": {
      "type": "array",
      "description": "Metrics are continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have challenge-based data.",
      "items": {
        "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1ChallengeMetrics"
      }
    }
  },
  "type": "object",
  "$defs": {
    "GoogleCloudRecaptchaenterpriseV1ChallengeMetrics": {
      "properties": {
        "failedCount": {
          "type": "string",
          "description": "Count of submitted challenge solutions that were incorrect or otherwise deemed suspicious such that a subsequent challenge was triggered.",
          "format": "int64"
        },
        "passedCount": {
          "format": "int64",
          "description": "Count of nocaptchas (successful verification without a challenge) plus submitted challenge solutions that were correct and resulted in verification.",
          "type": "string"
        },
        "nocaptchaCount": {
          "format": "int64",
          "type": "string",
          "description": "Count of nocaptchas (successful verification without a challenge) issued."
        },
        "pageloadCount": {
          "type": "string",
          "description": "Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent to a count of pageloads for pages that include reCAPTCHA.",
          "format": "int64"
        }
      },
      "description": "Metrics related to challenges.",
      "type": "object"
    },
    "GoogleCloudRecaptchaenterpriseV1ScoreDistribution": {
      "type": "object",
      "description": "Score distribution.",
      "properties": {
        "scoreBuckets": {
          "description": "Map key is score value multiplied by 100. The scores are discrete values between [0, 1]. The maximum number of buckets is on order of a few dozen, but typically much lower (ie. 10).",
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "format": "int64"
          }
        }
      }
    },
    "GoogleCloudRecaptchaenterpriseV1ScoreMetrics": {
      "description": "Metrics related to scoring.",
      "properties": {
        "actionMetrics": {
          "additionalProperties": {
            "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1ScoreDistribution"
          },
          "type": "object",
          "description": "Action-based metrics. The map key is the action name which specified by the site owners at time of the \"execute\" client-side call."
        },
        "overallMetrics": {
          "$ref": "#/$defs/GoogleCloudRecaptchaenterpriseV1ScoreDistribution",
          "description": "Aggregated score metrics for all traffic."
        }
      },
      "type": "object"
    }
  }
}