- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- TimeSeriesDescriptor
- ValueDescriptor
- TimeSeriesData
- LabelValue
- PointData
- Try it!
Queries time series using Monitoring Query Language.
HTTP request
POST https://monitoring.googleapis.com/v3/{name}/timeSeries:query
Path parameters
Parameters | |
---|---|
name |
Required. The project on which to execute the request. The format is:
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "query": string, "pageSize": integer, "pageToken": string } |
Fields | |
---|---|
query |
Required. The query in the Monitoring Query Language format. The default time zone is in UTC. |
pageSize |
A positive number that is the maximum number of timeSeriesData to return. |
pageToken |
If this field is not empty then it must contain the |
Response body
The timeSeries.query
response.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "timeSeriesDescriptor": { object ( |
Fields | |
---|---|
timeSeriesDescriptor |
The descriptor for the time series data. |
timeSeriesData[] |
The time series data. |
nextPageToken |
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 |
partialErrors[] |
Query execution errors that may have caused the time series data returned to be incomplete. The available data will be available in the response. |
Authorization scopes
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 Authentication Overview.
TimeSeriesDescriptor
A descriptor for the labels and points in a time series.
JSON representation |
---|
{ "labelDescriptors": [ { object ( |
Fields | |
---|---|
labelDescriptors[] |
Descriptors for the labels. |
pointDescriptors[] |
Descriptors for the point data value columns. |
ValueDescriptor
A descriptor for the value columns in a data point.
JSON representation |
---|
{ "key": string, "valueType": enum ( |
Fields | |
---|---|
key |
The value key. |
valueType |
The value type. |
metricKind |
The value stream kind. |
unit |
The unit in which |
TimeSeriesData
Represents the values of a time series associated with a TimeSeriesDescriptor.
JSON representation |
---|
{ "labelValues": [ { object ( |
Fields | |
---|---|
labelValues[] |
The values of the labels in the time series identifier, given in the same order as the |
pointData[] |
The points in the time series. |
LabelValue
A label value.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field value . The label value can be a bool, int64, or string. value can be only one of the following: |
|
boolValue |
A bool label value. |
int64Value |
An int64 label value. |
stringValue |
A string label value. |
PointData
A point's value columns and time interval. Each point has one or more point values corresponding to the entries in pointDescriptors
field in the TimeSeriesDescriptor associated with this object.
JSON representation |
---|
{ "values": [ { object ( |
Fields | |
---|---|
values[] |
The values that make up the point. |
timeInterval |
The time interval associated with the point. |