read method
Returns metric data.
HTTP request
POST https://monitoring.api.cloud.yandex.net/monitoring/v2/data/read
Query parameters
Parameter | Description |
---|---|
folderId | This is a required field. Metric folder ID. The maximum string length is 50 characters. |
Request body parameters
{
"query": "string",
"fromTime": "string",
"toTime": "string",
"downsampling": {
"gridAggregation": "string",
"gapFilling": "string",
// `downsampling` only includes one of these fields: `maxPoints`, `gridInterval`, or `disabled`
"maxPoints": "string",
"gridInterval": "string",
"disabled": true,
// end of the list of possible `downsampling` fields
}
}
Field | Description |
---|---|
query | string This is a required field. Query text. To learn about its syntax, see Query language in Monitoring. |
fromTime | string (date-time) This is a required field. Time interval starting point in RFC3339 format. String in RFC3339 format. |
toTime | string (date-time) This is a required field. Time interval end point in RFC3339 format. String in RFC3339 format. |
downsampling | object This is a required field. Downsampling parameters. |
downsampling. gridAggregation |
string Downsampling aggregation function. Available downsampling aggregation functions.
|
downsampling. gapFilling |
string Parameters for filling in missing data. Methods for filling gaps in data during downsampling.
|
downsampling. maxPoints |
string (int64) downsampling only includes one of these fields: maxPoints , gridInterval , or disabled Maximum number of points per request. This value must be greater than 10. |
downsampling. gridInterval |
string (int64) downsampling only includes one of these fields: maxPoints , gridInterval , or disabled Downsampling time window, i.e., grid, size in milliseconds. Data points within this time window are merged into a single value using the selected aggregation function. This value must be greater than 0. |
downsampling. disabled |
boolean (boolean) downsampling only includes one of these fields: maxPoints , gridInterval , or disabled Indicates that the response data will not be downsampled. |
Response
HTTP Code: 200 - OK
{
"metrics": [
{
"name": "string",
"labels": "object",
"type": "string",
"timeseries": {
"timestamps": [
"number"
],
"doubleValues": [
"number"
],
"int64Values": [
"number"
]
}
}
]
}
Field | Description |
---|---|
metrics[] | object Metrics with timestamps. |
metrics[]. name |
string Metric name. |
metrics[]. labels |
object Metric labels in |
metrics[]. type |
string Metric type.
|
metrics[]. timeseries |
object Metric values. |
metrics[]. timeseries. timestamps[] |
number (int64) List of timestamps in Unix millisecond format. |
metrics[]. timeseries. doubleValues[] |
number (double) List of fractional metric values. |
metrics[]. timeseries. int64Values[] |
number (int64) List of integer metric values. Only available for |