projects

Get metrics data for scripts, such as number of executions and active users.

get/v1/projects/{scriptId}/metrics

Request

  • Base URL: https://script.googleapis.com
  • URL: https://script.googleapis.com/v1/projects/{scriptId}/metrics
  • Auth: OAuth 2 (implicit, authorization URL https://accounts.google.com/o/oauth2/auth, scopes: https://www.googleapis.com/auth/script.metrics) and OAuth 2 (authorization code, authorization URL https://accounts.google.com/o/oauth2/auth, token URL https://accounts.google.com/o/oauth2/token, scopes: https://www.googleapis.com/auth/script.metrics)

Path parameters

scriptIdstring required

Required field indicating the script to get metrics for.

Query parameters

metricsFilter.deploymentIdstring

Optional field indicating a specific deployment to retrieve metrics from.

metricsGranularity'UNSPECIFIED_GRANULARITY' | 'WEEKLY' | 'DAILY'

Required field indicating what granularity of metrics are returned.

Response

Successful response

Changes