Analytics

Query dashboards, automation estimates, insights, and metrics.

Configure Automation Estimates

post
Authorizations
AuthorizationstringRequired

Personal Access Token.

Path parameters
organization_idstringRequired
workspace_idstringRequired
Body

Request message for ConfigureAutomationEstimates method. Configures the estimated cost and time savings for automations within a workspace.

Responses
chevron-right
200

A successful response.

application/json

Response message for ConfigureAutomationEstimates method. Returns the configured automation estimates for the workspace.

post
/api/v1/organizations/{organization_id}/workspaces/{workspace_id}/dashboards:configureAutomationEstimates

Query Insights

get
Authorizations
AuthorizationstringRequired

Personal Access Token.

Path parameters
organization_idstringRequired
Query parameters
filter.workspace_idsstring[]Optional

Optional list of workspace IDs to filter insights. Format: organizations/{organization}/workspaces/{workspace} If empty, insights for all workspaces are returned.

filter.automation_idsstring[]Optional

Optional list of automation IDs to filter insights. Format: organizations/{organization}/workspaces/{workspace}/automations/{automation} If empty, insights for all automations are returned.

filter.time_window.start_timestring · date-timeRequired

The start time of the window (inclusive).

filter.time_window.end_timestring · date-timeRequired

The end time of the window (inclusive).

filter.time_window.time_zonestringOptional

The timezone for interpreting the time window. Format: IANA timezone identifier (e.g., "America/New_York", "Europe/London"). Defaults to "UTC" if not specified.

Responses
chevron-right
200

A successful response.

application/json

Response message for QueryInsights method. Contains aggregated analytics insights across value, runs, and completions.

get
/api/v1/organizations/{organization_id}/dashboards:queryInsights

Query Automation Estimates

get
Authorizations
AuthorizationstringRequired

Personal Access Token.

Path parameters
organization_idstringRequired
Responses
chevron-right
200

A successful response.

application/json

Response message for QueryAutomationEstimates method. Contains automation estimates grouped by workspace.

get
/api/v1/organizations/{organization_id}/dashboards:queryAutomationEstimates

Query Metrics

get

This RPC retrieves time-series metric data for a specific organization, supporting multiple metrics in a single request. Results can be filtered, grouped, and sorted by tag dimensions.

The response contains one result per requested metric. Each result includes multiple time series (one per unique group_by combination), with each series containing chronologically ordered data points showing the aggregated metric value over time.

Use the filter parameter (AIP-160 syntax) to restrict data to specific tag values, and group_by to break down results by tag dimensions. The order_by and page_size parameters enable sorting and limiting results (useful for "top N" queries). The interval and aggregation parameters control how data is aggregated. If not specified, the server will determine appropriate defaults based on the time range.

Example use cases:

  • Dashboard view: metrics=["runs", "pages"], group_by=["status"]

  • Top 10 workspaces: metrics=["runs"], group_by=["workspace_id"], order_by="value desc", page_size=10

  • Success rate: metrics=["runs"], filter='status = "success"'

  • Multi-metric comparison: metrics=["files", "automations"], group_by=["workspace_id"]

Authorizations
AuthorizationstringRequired

Personal Access Token.

Path parameters
organization_idstringRequired
Query parameters
metricsstring[]Required

The names of the metrics to query.

Identifies which metric types to retrieve data for in a single request. All metrics will use the same filter, group_by, time range, interval, and aggregation settings.

Examples: ["runs"], ["runs", "pages"], ["files", "automations"]

filterstringOptional

Filter expression to apply before aggregation.

Reduces the dataset to only records matching the filter criteria. Uses the AIP-160 filtering syntax for flexible query expressions. An empty string means no filtering (all records included).

Supported operators: =, !=, AND, OR, NOT, IN

Examples:

  • 'status = "success"'
  • 'status = "success" AND workspace_id = "ws_123"'
  • 'status IN ["success", "pending"]'
  • 'workspace_id = "ws_123" OR workspace_id = "ws_456"'

See https://google.aip.dev/160 for full syntax specification.

group_bystring[]Optional

Tag dimensions to group results by.

Each unique combination of these tag values becomes a separate time series. An empty list means no grouping (single aggregated series).

Examples: ["status"], ["workspace_id", "status"]

start_timestring · date-timeRequired

Start time for the query range (inclusive).

Data points with timestamps on or after this time will be included.

end_timestring · date-timeRequired

End time for the query range (exclusive).

Data points with timestamps before this time will be included.

intervalstring · enumOptional

Requested time interval for aggregation.

Specifies the desired granularity for data points. The server may adjust this based on the time range or data availability.

If unspecified, the server will determine an appropriate interval.

  • METRIC_INTERVAL_UNSPECIFIED: Unspecified interval. Server will determine appropriate interval.
  • METRIC_INTERVAL_HOUR: Hourly aggregation.
  • METRIC_INTERVAL_DAY: Daily aggregation.
  • METRIC_INTERVAL_WEEK: Weekly aggregation.
  • METRIC_INTERVAL_MONTH: Monthly aggregation.
Default: METRIC_INTERVAL_UNSPECIFIEDPossible values:
aggregationstring · enumOptional

Aggregation function to apply to metric values.

Specifies how values should be combined within each interval.

If unspecified, defaults to COUNT.

  • AGGREGATION_FUNCTION_UNSPECIFIED: Unspecified aggregation. Defaults to COUNT.
  • AGGREGATION_FUNCTION_COUNT: Count of occurrences.
  • AGGREGATION_FUNCTION_SUM: Sum of values.
  • AGGREGATION_FUNCTION_AVG: Average of values.
  • AGGREGATION_FUNCTION_MIN: Minimum value.
  • AGGREGATION_FUNCTION_MAX: Maximum value.
Default: AGGREGATION_FUNCTION_UNSPECIFIEDPossible values:
order_bystringOptional

Ordering for series results within each metric.

Uses AIP-132 syntax: "field_name [asc|desc]" Multiple orderings can be comma-separated.

Supported fields:

  • Tag names from group_by (e.g., "workspace_id asc", "status desc")
  • "value" for sorting by aggregated metric value (uses last data point)

Examples:

  • "value desc" - Highest values first (e.g., top workspaces)
  • "workspace_id asc" - Alphabetical by workspace ID
  • "value desc, workspace_id asc" - By value descending, then workspace ascending

If unspecified, series are returned in arbitrary order.

See https://google.aip.dev/132 for full syntax specification.

page_sizeinteger · int32Optional

Maximum number of series to return per metric.

Limits the number of time series in each metric's results. Useful with order_by for "top N" queries.

If unspecified or zero, all matching series are returned. If page_size is larger than the number of matching series, all series are returned.

Example: order_by="value desc", page_size=10 returns top 10 series.

page_tokenstringOptional

Pagination token for retrieving the next page of series.

When a response contains more series than page_size, the next_page_token from the response can be passed here to retrieve the next page.

If empty, returns the first page of results.

See https://google.aip.dev/158 for pagination specification.

Responses
chevron-right
200

A successful response.

application/json

Response message for the QueryMetrics RPC.

Contains results for each requested metric, with time series data and metadata about the query execution.

next_page_tokenstringRead-onlyOptional

Token for retrieving the next page of results.

If non-empty, there are more results available. Pass this value as page_token in the next request to retrieve the next page.

If empty, there are no more results (this is the last page).

When paginating, all metrics will include their next page of series.

See https://google.aip.dev/158 for pagination specification.

get
/api/v1/organizations/{organization_id}/metrics:query

Last updated

Was this helpful?