Method: projects.timeSeries.list

Lists time series that match a filter. This method does not require a Stackdriver account.

HTTP request

GET https://monitoring.googleapis.com/v3/{name}/timeSeries

Path parameters

Parameters
name

string

The project on which to execute the request. The format is "projects/{project_id_or_number}".

Query parameters

Parameters
filter

string

A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example:

metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
    metric.label.instance_name = "my-instance-name"

interval

object(TimeInterval)

The time interval for which results should be returned. Only time series that contain data points in the specified interval are included in the response.

aggregation

object(Aggregation)

By default, the raw time series data is returned. Use this field to combine multiple time series for different views of the data.

orderBy

string

Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.

view

enum(TimeSeriesView)

Specifies which information is returned about the time series.

pageSize

number

A positive number that is the maximum number of results to return. When view field sets to FULL, it limits the number of Points server will return; if view field is HEADERS, it limits the number of TimeSeries server will return.

pageToken

string

If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.

Request body

The request body must be empty.

Response body

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

The timeSeries.list response.

JSON representation
{
  "timeSeries": [
    {
      object(TimeSeries)
    }
  ],
  "nextPageToken": string,
}
Fields
timeSeries[]

object(TimeSeries)

One or more time series that match the filter included in the request.

nextPageToken

string

If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.

Authorization

Requires one of the following OAuth scopes:

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

For more information, see the Auth Guide.

Aggregation

Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (perSeriesAligner) followed by an optional reduction of the data across different time series (crossSeriesReducer). For more details, see Aggregation.

JSON representation
{
  "alignmentPeriod": string,
  "perSeriesAligner": enum(Aligner),
  "crossSeriesReducer": enum(Reducer),
  "groupByFields": [
    string
  ],
}
Fields
alignmentPeriod

string (Duration format)

The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

perSeriesAligner

enum(Aligner)

The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.

Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.

crossSeriesReducer

enum(Reducer)

The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.

Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned.

groupByFields[]

string

The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored.

Aligner

The Aligner describes how to bring the data points in a single time series into temporal alignment.

Enums
ALIGN_NONE No alignment. Raw data is returned. Not valid if cross-time series reduction is requested. The value type of the result is the same as the value type of the input.
ALIGN_DELTA Align and convert to delta metric type. This alignment is valid for cumulative metrics and delta metrics. Aligning an existing delta metric to a delta metric requires that the alignment period be increased. The value type of the result is the same as the value type of the input.
ALIGN_RATE Align and convert to a rate. This alignment is valid for cumulative metrics and delta metrics with numeric values. The output is a gauge metric with value type DOUBLE.
ALIGN_INTERPOLATE Align by interpolating between adjacent points around the period boundary. This alignment is valid for gauge metrics with numeric values. The value type of the result is the same as the value type of the input.
ALIGN_NEXT_OLDER Align by shifting the oldest data point before the period boundary to the boundary. This alignment is valid for gauge metrics. The value type of the result is the same as the value type of the input.
ALIGN_MIN Align time series via aggregation. The resulting data point in the alignment period is the minimum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the result is the same as the value type of the input.
ALIGN_MAX Align time series via aggregation. The resulting data point in the alignment period is the maximum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the result is the same as the value type of the input.
ALIGN_MEAN Align time series via aggregation. The resulting data point in the alignment period is the average or arithmetic mean of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the output is DOUBLE.
ALIGN_COUNT Align time series via aggregation. The resulting data point in the alignment period is the count of all data points in the period. This alignment is valid for gauge and delta metrics with numeric or Boolean values. The value type of the output is INT64.
ALIGN_SUM Align time series via aggregation. The resulting data point in the alignment period is the sum of all data points in the period. This alignment is valid for gauge and delta metrics with numeric and distribution values. The value type of the output is the same as the value type of the input.
ALIGN_STDDEV Align time series via aggregation. The resulting data point in the alignment period is the standard deviation of all data points in the period. This alignment is valid for gauge and delta metrics with numeric values. The value type of the output is DOUBLE.
ALIGN_COUNT_TRUE Align time series via aggregation. The resulting data point in the alignment period is the count of True-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The value type of the output is INT64.
ALIGN_FRACTION_TRUE Align time series via aggregation. The resulting data point in the alignment period is the fraction of True-valued data points in the period. This alignment is valid for gauge metrics with Boolean values. The output value is in the range [0, 1] and has value type DOUBLE.
ALIGN_PERCENTILE_99 Align time series via aggregation. The resulting data point in the alignment period is the 99th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.
ALIGN_PERCENTILE_95 Align time series via aggregation. The resulting data point in the alignment period is the 95th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.
ALIGN_PERCENTILE_50 Align time series via aggregation. The resulting data point in the alignment period is the 50th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.
ALIGN_PERCENTILE_05 Align time series via aggregation. The resulting data point in the alignment period is the 5th percentile of all data points in the period. This alignment is valid for gauge and delta metrics with distribution values. The output is a gauge metric with value type DOUBLE.

Reducer

A Reducer describes how to aggregate data points from multiple time series into a single time series.

Enums
REDUCE_NONE No cross-time series reduction. The output of the aligner is returned.
REDUCE_MEAN Reduce by computing the mean across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric or distribution values. The value type of the output is DOUBLE.
REDUCE_MIN Reduce by computing the minimum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric values. The value type of the output is the same as the value type of the input.
REDUCE_MAX Reduce by computing the maximum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric values. The value type of the output is the same as the value type of the input.
REDUCE_SUM Reduce by computing the sum across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric and distribution values. The value type of the output is the same as the value type of the input.
REDUCE_STDDEV Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for delta and gauge metrics with numeric or distribution values. The value type of the output is DOUBLE.
REDUCE_COUNT Reduce by computing the count of data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of numeric, Boolean, distribution, and string value type. The value type of the output is INT64.
REDUCE_COUNT_TRUE Reduce by computing the count of True-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The value type of the output is INT64.
REDUCE_FRACTION_TRUE Reduce by computing the fraction of True-valued data points across time series for each alignment period. This reducer is valid for delta and gauge metrics of Boolean value type. The output value is in the range [0, 1] and has value type DOUBLE.
REDUCE_PERCENTILE_99 Reduce by computing 99th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE
REDUCE_PERCENTILE_95 Reduce by computing 95th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE
REDUCE_PERCENTILE_50 Reduce by computing 50th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE
REDUCE_PERCENTILE_05 Reduce by computing 5th percentile of data points across time series for each alignment period. This reducer is valid for gauge and delta metrics of numeric and distribution type. The value of the output is DOUBLE

TimeSeriesView

Controls which fields are returned by timeSeries.list.

Enums
FULL Returns the identity of the metric(s), the time series, and the time series data.
HEADERS Returns the identity of the metric and the time series resource, but not the time series data.

Send feedback about...

Stackdriver Monitoring