Get Label Values

Get Label Values
Get label values

Returns a list of label values for a specific label name

Request
URI
GET
https://{vcf-operations-fqdn}/api/v1/label/{label_name}/values
COPY
Path Parameters
string
label_name
Required  

Name of the label

label_name example
__name__
Query Parameters
string
sourceId
Required  

The source identifier to query data for, such as a vCenter instance UUID or NSX ID.

string of array
match
Optional

Series selectors to filter results (optional). To receive non-empty results, at least one selector must identify a metric by name — either as a bare name (e.g. cpu.usage.HOST) or via the __name__ label (e.g. {__name__="cpu.usage.HOST"}). Selectors that contain only tag/label matchers without a metric name (e.g. {host="host-15"}) will produce an empty response.

match example
cpu.usage.HOST,mem.consumed.HOST
string
start
Optional

Start timestamp in Unix epoch seconds or RFC3339 format.

start example
1739780198
string
end
Optional

End timestamp in Unix epoch seconds or RFC3339 format.

end example
1739780198
integer
limit
Optional

Maximum number of results to return. Behaviour:

  • Omitted or null: default of 500 is applied.
  • -1: no limit; all matching results are returned.
  • 1–10000: used as-is.
  • > 10000: silently capped to 10000.
  • 0 or any other negative value: rejected with 400.
limit example
100

Authentication
This operation uses the following authentication methods.
Responses
200

Successful response

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.

Enumeration: 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 message returned when the query fails. 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

422

Unprocessable Entity - Query cannot be executed

Operation doesn't return any data structure

429

Too Many Requests - Rate limit exceeded

Operation doesn't return any data structure

Response Headers

integer
Retry-After

Number of seconds to wait before retrying


500

Internal server error

Operation doesn't return any data structure

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/v1/label/{label_name}/values?sourceId=v