script.projects.getMetrics
Retrieve execution counts and active-user metrics for a specified script, with daily or weekly granularity and optional deployment filtering, returned as JSON.
Instructions
Get metrics data for scripts, such as number of executions and active users [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: create, get, getContent, updateContent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| scriptId | Yes | [URL path segment] Required field indicating the script to get metrics for. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. | |
| metricsGranularity | No | [query parameter] Required field indicating what granularity of metrics are returned. Values: `UNSPECIFIED_GRANULARITY` = Default metric granularity used to query no metrics.; `WEEKLY` = Represents weekly metrics.; `DAILY` = Represents daily metrics over a period of 7 days.. | |
| metricsFilter.deploymentId | No | [query parameter] Optional field indicating a specific deployment to retrieve metrics from. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activeUsers | No | ||
| totalExecutions | No | ||
| failedExecutions | No |