read method
Returns metric data.
HTTP request
POST https://monitoring.api.cloud.yandex.net/monitoring/v2/data/read
Query parameters
Parameter | Description |
---|---|
folderId | Required field. ID of the folder that the metric belongs to. Maximum string length: 50 characters. |
Parameters in the request body
{
"query": "string",
"fromTime": "string",
"toTime": "string",
"downsampling": {
"gridAggregation": "string",
"gapFilling": "string",
// `downsampling` only includes one of the `maxPoints`, `gridInterval`, or `disabled` fields
"maxPoints": "string",
"gridInterval": "string",
"disabled": true,
// end of the list of possible `downsampling` fields
}
}
Field | Description |
---|---|
query | string Required field. Query text. The syntax is described in Query language |
fromTime | string (date-time) Required field. Interval starting point in RFC3339 format. String in RFC3339 format. |
toTime | string (date-time) Required field. Interval end point in RFC3339 format. String in RFC3339 format. |
downsampling | object Required field. Downsampling parameters. |
downsampling. gridAggregation |
string An aggregation function that is used for downsampling. List of available aggregation functions that are used at downsampling.
|
downsampling. gapFilling |
string Parameters for filling in data gaps. List of methods for filling in data gaps at downsampling.
|
downsampling. maxPoints |
string (int64) downsampling includes only one of the fields maxPoints , gridInterval , or disabled The maximum number of points to be returned in the response to the query. The value must be greater than 10. |
downsampling. gridInterval |
string (int64) downsampling only includes one of the fields maxPoints , gridInterval , or disabled The width of the time window (grid) in milliseconds. Used for downsampling. Points inside the window are combined into one using the aggregation function. The value must be greater than 0. |
downsampling. disabled |
boolean (boolean) downsampling only includes one of the fields maxPoints , gridInterval , or disabled Indicates that the data in the response to the query will be returned without downsampling. |
Response
HTTP Code: 200 - OK
{
"metrics": [
{
"name": "string",
"labels": "object",
"type": "string",
"timeseries": {
"timestamps": [
"string"
],
"doubleValues": [
"number"
],
"int64Values": [
"string"
]
}
}
]
}
Field | Description |
---|---|
metrics[] | object List of the metrics with time points. |
metrics[]. name |
string Metric name. |
metrics[]. labels |
object List of metric labels in |
metrics[]. type |
string Metric type.
|
metrics[]. timeseries |
object Metric values. |
metrics[]. timeseries. timestamps[] |
string (int64) List of time points in the format of Unix milliseconds. |
metrics[]. timeseries. doubleValues[] |
number (double) List of fractional metric values. |
metrics[]. timeseries. int64Values[] |
string (int64) List of integer metric values. Only available for metrics of the |