Query Metric Metadata

Query Metric Metadata

Returns metadata about metrics currently scraped from targets.

Request
URI
GET
https://{api_host}/api/v1/metadata
COPY
Query Parameters
string
metric
Optional

Metric name.

integer
limit
Optional

Maximum number of returned series. Doesn't affect scalars or strings but truncates the number of series for matrices and vectors. If not set, default limit is applied.

limit example
100
string
sourceId
Optional

Source Id against which we need to query data for, like VC Instance UUID, NSX Id etc.


Authentication
This operation uses the following authentication methods.
Responses
200

OK.

Returns PrometheusResponse of type(s) application/json
{
    "status": "string",
    "data": {},
    "pageInfo": {
        "nextPageToken": "eyJuYW1lIjoiY3B1LnVzYWdlIiwidGltZXN0YW1wIjoxNjAwMDAwMDAwfQ==",
        "pageSize": 50
    },
    "errorType": "string",
    "error": "string",
    "warnings": [
        "string"
    ],
    "infos": [
        "string"
    ]
}
string
status
Required

API execution status.

Possible values are : success, error,
object
data
Required

Loose object reference for circumventing OpenAPI Generator's oneOf() problem for client SDK

object
pageInfo
Optional

Pagination metadata for paginated responses.

string
errorType
Optional

Type of an error. This field is set only if status is "error". The data field may still hold additional data.

string
error
Optional

Error while querying to the metrics. This field is set only if status is "error". The data field may still hold additional data.

array of string
warnings
Optional

Warnings generated during API execution. This field is set only if there were warnings while executing the request. The data field will still hold additional data.

array of string
infos
Optional

Info generated during API execution. This field is set only if there were info-level messages while executing the request.


400

Bad request.

Operation doesn't return any data structure

401

Unauthorized.

Operation doesn't return any data structure

403

Forbidden.

Operation doesn't return any data structure

503

Service Unavailable.

Operation doesn't return any data structure

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/metadata