Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Monitoring
  • Getting started
  • Access management
  • Terraform reference
    • Authentication with the API
      • Overview
        • Overview
        • read
        • write
        • prometheusMetrics
  • Release notes

In this article:

  • HTTP request
  • Query parameters
  • Request body parameters
  • Response
  1. API reference
  2. REST
  3. MetricsData
  4. read

read method

Written by
Yandex Cloud
Updated at April 14, 2025
  • HTTP request
  • Query parameters
  • Request body parameters
  • Response

Returns metric data.

HTTP requestHTTP request

POST https://monitoring.api.cloud.yandex.net/monitoring/v2/data/read

Query parametersQuery parameters

Parameter Description
folderId This is a required field. Metric folder ID. The maximum string length is 50 characters.

Request body parametersRequest 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.

  • MAX: Maximum
  • MIN: Minimum
  • SUM: Total
  • AVG: Average value, which is also default.
  • LAST: Last value
  • COUNT: Point count
downsampling.
gapFilling
string
Parameters for filling in missing data.

Methods for filling gaps in data during downsampling.

  • NULL: Returns null as the metric value and timestamp as the timestamp value. This is also the default value.
  • NONE: Returns no values.
  • PREVIOUS: Returns the value of the previous data point.
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.

ResponseResponse

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 key:value format.

metrics[].
type
string

Metric type.

  • DGAUGE: Numeric value. Set as a fraction.
  • IGAUGE: Numeric value. Set as an integer.
  • COUNTER: Counter.
  • RATE: Derivative value.
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 IGAUGE type metrics.

Was the article helpful?

Previous
Overview
Next
write
© 2025 Direct Cursus Technology L.L.C.