fluxgatedocs
Dashboard ↗GitHub

List labels

GET/v1/labels
Bearer API keyQuery serviceAPI 1.0.0

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.

bash
curl --request GET 'http://localhost:8082/v1/labels?metric=http.requests' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

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 · stringrequired
labelquery · stringoptional
limitquery · integeroptional

Defaults to 500 for absent, malformed or nonpositive input; keys cap at 500 and values at 1000. No pagination or truncation indicator.

Default 500

Responses

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

metricstringoptional
labelsstring[]optional
Array items · string
labelstringoptional
valuesstring[]optional
Array items · string

Illustrative response

Values are examples; they are not a response from a hosted Fluxgate service.

json
{
  "metric": "http.requests",
  "labels": [
    "service"
  ]
}
401Missing or invalid credentials.

Missing or invalid credentials.

Response headers

WWW-Authenticatestring

The Bearer challenge.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable 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_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

422An RFC 9457 problem document.

An RFC 9457 problem document.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable 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_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

500An RFC 9457 problem document.

An RFC 9457 problem document.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable 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_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

503Capacity exhausted; respect Retry-After before retrying.

Capacity exhausted; respect Retry-After before retrying.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable 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_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

504An RFC 9457 problem document.

An RFC 9457 problem document.

Response headers

X-Request-Idstring

Correlation ID, echoed on every response. Quote it when reporting a problem.

application/problem+json

Problem ↗
typestringrequired
Format uri
titlestringrequired
statusintegerrequired
detailstringoptional

Human-readable explanation. Do not branch on this.

codestringrequired

Stable 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_idstringoptional
errorsFieldError[]optional
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

Dotted path to the offending value, including the batch index.

messagestringrequired

What the submitter must change.

Something to improve? Edit this page View source

Search the complete documentation.