Get Metrics V2

Get Metrics V2

Get metric points for an entity for an entity id and metric for a given time interval. Maximum number of metrics point returned by API is 300. In case the interval and time period combination have more than 300 metrics points, client should break the time period to multiple batches to get all the metrics points. These metric points are the points inside the metric charts (CPU, network rate, etc.)

Request
URI
GET
https://{api_host}/api/ni/metrics/v2
COPY
Query Parameters
string
entity_id
Required

entity type

string
metric
Required

metric name

integer
interval
Required

metric points interval

integer
start
Required

start time for query in epoch seconds

integer
end
Required

end time for query in epoch seconds

integer
default_value
Optional

default value for no-data point


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns MetricResponseV2 of type(s) application/json
This response body class contains all of the following: MetricResponseBase , InlineMetricResponseV21
{
    "metric": "string",
    "display_name": "string",
    "interval": 0,
    "unit": "string",
    "start": 0,
    "end": 0,
    "pointlist": [
        {
            "timestamps": [
                0
            ],
            "values": [
                "number"
            ]
        }
    ]
}

400

Bad Request

Returns ApiError of type(s) application/json
{
    "code": 0,
    "message": "string",
    "details": [
        {
            "code": 0,
            "message": "string",
            "target": [
                "string"
            ]
        }
    ]
}
integer As int32 As int32
code
Optional

code

string
message
Optional

message

details
Optional

details


401

Unauthorized

Operation doesn't return any data structure

500

Internal Error

Operation doesn't return any data structure