---
title: "POST /v1/{+orgenv}/securityStats:queryTimeSeriesStats"
method: POST
path: "/v1/{+orgenv}/securityStats:queryTimeSeriesStats"
tags: ["organizations"]
---

# POST /v1/{+orgenv}/securityStats:queryTimeSeriesStats

`POST /v1/{+orgenv}/securityStats:queryTimeSeriesStats`

Retrieve security statistics as a collection of time series.

## Path parameters

- `orgenv` string, required

## Request body

- GoogleCloudApigeeV1QueryTimeSeriesStatsRequest — QueryTimeSeriesStatsRequest represents a query that returns a collection of time series sequences grouped by their values.
  - `timestampOrder` 'ORDER_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING' — Order the sequences in increasing or decreasing order of timestamps. Default is descending order of timestamps (latest first).
  - `filter` string — Filter further on specific dimension values. Follows the same grammar as custom report's filter expressions. Example, apiproxy eq 'foobar'. https://cloud.google.com/apigee/docs/api-platform/analytics/analytics-reference#filters
  - `pageSize` integer — Page size represents the number of time series sequences, one per unique set of dimensions and their values.
  - `pageToken` string — Page token stands for a specific collection of time series sequences.
  - `metrics` GoogleCloudApigeeV1MetricAggregation[] — Required. List of metrics and their aggregations.
    - `name` string — Name of the metric
    - `aggregation` 'AGGREGATION_FUNCTION_UNSPECIFIED' | 'AVG' | 'SUM' | 'MIN' | 'MAX' | 'COUNT_DISTINCT' — Aggregation function associated with the metric.
    - `order` 'ORDER_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING' — Ordering for this aggregation in the result. For time series this is ignored since the ordering of points depends only on the timestamp, not the values.
  - `windowSize` 'WINDOW_SIZE_UNSPECIFIED' | 'MINUTE' | 'HOUR' | 'DAY' | 'MONTH' — Time buckets to group the stats by.
  - `timeRange` GoogleTypeInterval — Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
    - `endTime` string, google-datetime — Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
    - `startTime` string, google-datetime — Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
  - `dimensions` string[] — List of dimension names to group the aggregations by. If no dimensions are passed, a single trend line representing the requested metric aggregations grouped by environment is returned.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/apigee.md) · [All operations](https://skmtc.net/google/apis/apigee/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/apigee/versions/6e272fa448a7/schema)
