Get Metrics

Get Metrics

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://vrni.example.com/api/ni/metrics
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


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns MetricResponse of type(s) application/json
{
    "metric": "string",
    "display_name": "string",
    "interval": 0,
    "unit": "string",
    "pointlist": [
        [
            {}
        ]
    ],
    "start": 0,
    "end": 0
}
string
metric
Optional

metric

string
display_name
Optional

display_name

integer
interval
Optional

interval

string
unit
Optional

unit

array
pointlist
Optional

pointlist

integer As int64 As int64
start
Optional

start

integer As int64 As int64
end
Optional

end


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