Without label, returns the label keys present on the metric. With
label, returns the distinct values that key takes — enough for a UI to
offer a filter without the caller guessing.
Base URL
These addresses are for local development. Replace them with your own deployed service URLs.
http://localhost:8082 Local query API; replace with the deployed query URL.
Request example
Replace credential and batch-key placeholders before running. JavaScript examples use Node.js 24; Python examples use the standard library. Browser clients need a same-origin proxy or suitable CORS configuration. See safe retries for production retry handling.
curl --request GET 'http://localhost:8082/v1/labels?metric=http.requests' \
--header 'Authorization: Bearer <YOUR_API_KEY>'const response = await fetch("http://localhost:8082/v1/labels?metric=http.requests", {
method: "GET",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>"
}
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
console.log(result);import json
from urllib.request import Request, urlopen
request = Request(
"http://localhost:8082/v1/labels?metric=http.requests",
method="GET",
headers={
"Authorization": "Bearer <YOUR_API_KEY>"
}
)
with urlopen(request, timeout=30) as response:
result = json.load(response)
print(result)Authentication
An API key in the form fxg_<key id>_<secret>, sent as
Authorization: Bearer fxg_....
The server stores only a SHA-256 digest of the secret. Every authentication failure returns an identical 401 regardless of cause, so a probing client cannot use the response to tell a valid key ID from an invalid one.
Credentials select the tenant. See tenant provisioning and key rotation.
Parameters
metricquery · stringrequiredlabelquery · stringoptionallimitquery · integeroptionalDefaults to 500 for absent, malformed or nonpositive input; keys cap at 500 and values at 1000. No pagination or truncation indicator.
500Responses
Expand a response to inspect its headers and complete schema.
200Label keys, or one label's values.
Label keys, or one label's values.
application/json
metricstringoptionallabelsstring[]optionalArray items · string
labelstringoptionalvaluesstring[]optionalArray items · string
Illustrative response
Values are examples; they are not a response from a hosted Fluxgate service.
{
"metric": "http.requests",
"labels": [
"service"
]
}401Missing or invalid credentials.
Missing or invalid credentials.
Response headers
WWW-AuthenticatestringThe Bearer challenge.
application/problem+json
Problem ↗typestringrequiredurititlestringrequiredstatusintegerrequireddetailstringoptionalHuman-readable explanation. Do not branch on this.
codestringrequiredStable machine-readable identifier. Branch on this.
"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"request_idstringoptionalerrorsFieldError[]optionalArray items · FieldError
FieldError ↗Object properties
fieldstringrequiredDotted path to the offending value, including the batch index.
messagestringrequiredWhat the submitter must change.
422An RFC 9457 problem document.
An RFC 9457 problem document.
Response headers
X-Request-IdstringCorrelation ID, echoed on every response. Quote it when reporting a problem.
application/problem+json
Problem ↗typestringrequiredurititlestringrequiredstatusintegerrequireddetailstringoptionalHuman-readable explanation. Do not branch on this.
codestringrequiredStable machine-readable identifier. Branch on this.
"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"request_idstringoptionalerrorsFieldError[]optionalArray items · FieldError
FieldError ↗Object properties
fieldstringrequiredDotted path to the offending value, including the batch index.
messagestringrequiredWhat the submitter must change.
500An RFC 9457 problem document.
An RFC 9457 problem document.
Response headers
X-Request-IdstringCorrelation ID, echoed on every response. Quote it when reporting a problem.
application/problem+json
Problem ↗typestringrequiredurititlestringrequiredstatusintegerrequireddetailstringoptionalHuman-readable explanation. Do not branch on this.
codestringrequiredStable machine-readable identifier. Branch on this.
"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"request_idstringoptionalerrorsFieldError[]optionalArray items · FieldError
FieldError ↗Object properties
fieldstringrequiredDotted path to the offending value, including the batch index.
messagestringrequiredWhat the submitter must change.
503Capacity exhausted; respect Retry-After before retrying.
Capacity exhausted; respect Retry-After before retrying.
Response headers
X-Request-IdstringCorrelation ID, echoed on every response. Quote it when reporting a problem.
application/problem+json
Problem ↗typestringrequiredurititlestringrequiredstatusintegerrequireddetailstringoptionalHuman-readable explanation. Do not branch on this.
codestringrequiredStable machine-readable identifier. Branch on this.
"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"request_idstringoptionalerrorsFieldError[]optionalArray items · FieldError
FieldError ↗Object properties
fieldstringrequiredDotted path to the offending value, including the batch index.
messagestringrequiredWhat the submitter must change.
504An RFC 9457 problem document.
An RFC 9457 problem document.
Response headers
X-Request-IdstringCorrelation ID, echoed on every response. Quote it when reporting a problem.
application/problem+json
Problem ↗typestringrequiredurititlestringrequiredstatusintegerrequireddetailstringoptionalHuman-readable explanation. Do not branch on this.
codestringrequiredStable machine-readable identifier. Branch on this.
"bad_request" "validation_failed" "unauthorized" "forbidden" "not_found" "method_not_allowed" "conflict" "payload_too_large" "unsupported_media_type" "rate_limited" "timeout" "service_unavailable" "internal_error"request_idstringoptionalerrorsFieldError[]optionalArray items · FieldError
FieldError ↗Object properties
fieldstringrequiredDotted path to the offending value, including the batch index.
messagestringrequiredWhat the submitter must change.