Method: organizations.environments.securityStats.queryTimeSeriesStats

Retrieve security statistics as a collection of time series.

HTTP request

POST https://apigee.googleapis.com/v1/{orgenv=organizations/*/environments/*}/securityStats:queryTimeSeriesStats

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
orgenv

string

Required. Should be of the form organizations//environments/.

Request body

The request body contains data with the following structure:

JSON representation
{
  "dimensions": [
    string
  ],
  "metrics": [
    {
      object (MetricAggregation)
    }
  ],
  "filter": string,
  "windowSize": enum (WindowSize),
  "timeRange": {
    object (Interval)
  },
  "timestampOrder": enum (Order),
  "pageSize": integer,
  "pageToken": string
}
Fields
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.

metrics[]

object (MetricAggregation)

Required. List of metrics and their aggregations.

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

windowSize

enum (WindowSize)

Time buckets to group the stats by.

timeRange

object (Interval)

Required. Time range for the stats.

timestampOrder

enum (Order)

Order the sequences in increasing or decreasing order of timestamps. Default is descending order of timestamps (latest first).

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.

Response body

Represents security stats result as a collection of time series sequences.

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

JSON representation
{
  "values": [
    {
      object (Sequence)
    }
  ],
  "columns": [
    string
  ],
  "nextPageToken": string
}
Fields
values[]

object (Sequence)

Results of the query returned as a JSON array.

columns[]

string

Column names corresponding to the same order as the inner values in the stats field.

nextPageToken

string

Next page token.

Authorization scopes

Requires the following OAuth scope:

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

WindowSize

Supported time series window sizes.

Enums
WINDOW_SIZE_UNSPECIFIED Unspecified window size. Default is 1 hour.
MINUTE 1 Minute window
HOUR 1 Hour window
DAY 1 Day window
MONTH 1 Month window

Sequence

A sequence of time series.

JSON representation
{
  "dimensions": {
    string: string,
    ...
  },
  "points": [
    array
  ]
}
Fields
dimensions

map (key: string, value: string)

Map of dimensions and their values that uniquely identifies a time series sequence.

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

points[]

array (ListValue format)

List of points. First value of each inner list is a timestamp.