Method: projects.keys.getMetrics

Get some aggregated metrics for a Key. This data can be used to build dashboards.

HTTP request

GET https://recaptchaenterprise.googleapis.com/v1/{name=projects/*/keys/*/metrics}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the requested metrics, in the format projects/{project}/keys/{key}/metrics.

Request body

The request body must be empty.

Response body

Metrics for a single Key.

If successful, the response body contains data with the following structure:

JSON representation
{
  "name": string,
  "startTime": string,
  "scoreMetrics": [
    {
      object (ScoreMetrics)
    }
  ],
  "challengeMetrics": [
    {
      object (ChallengeMetrics)
    }
  ]
}
Fields
name

string

Output only. Identifier. The name of the metrics, in the format projects/{project}/keys/{key}/metrics.

startTime

string (Timestamp format)

Inclusive start time aligned to a day (UTC).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

scoreMetrics[]

object (ScoreMetrics)

Metrics will be continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.

challengeMetrics[]

object (ChallengeMetrics)

Metrics will be continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have challenge-based data.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • recaptchaenterprise.metrics.get

For more information, see the IAM documentation.

ScoreMetrics

Metrics related to scoring.

JSON representation
{
  "overallMetrics": {
    object (ScoreDistribution)
  },
  "actionMetrics": {
    string: {
      object (ScoreDistribution)
    },
    ...
  }
}
Fields
overallMetrics

object (ScoreDistribution)

Aggregated score metrics for all traffic.

actionMetrics

map (key: string, value: object (ScoreDistribution))

Action-based metrics. The map key is the action name which specified by the site owners at time of the "execute" client-side call.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ScoreDistribution

Score distribution.

JSON representation
{
  "scoreBuckets": {
    integer: string,
    ...
  }
}
Fields
scoreBuckets

map (key: integer, value: string (int64 format))

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).

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ChallengeMetrics

Metrics related to challenges.

JSON representation
{
  "pageloadCount": string,
  "nocaptchaCount": string,
  "failedCount": string,
  "passedCount": string
}
Fields
pageloadCount

string (int64 format)

Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent to a count of pageloads for pages that include reCAPTCHA.

nocaptchaCount

string (int64 format)

Count of nocaptchas (successful verification without a challenge) issued.

failedCount

string (int64 format)

Count of submitted challenge solutions that were incorrect or otherwise deemed suspicious such that a subsequent challenge was triggered.

passedCount

string (int64 format)

Count of nocaptchas (successful verification without a challenge) plus submitted challenge solutions that were correct and resulted in verification.