fluxgatedocs
Dashboard ↗GitHub

List metrics

GET/v1/metrics
Bearer API keyQuery serviceAPI 1.0.0

Each entry carries its time range, which saves a caller from probing for it: a UI that has to guess renders an empty chart on its first attempt, which reads as "the system is broken" rather than "you asked about the wrong hour".

Entries group by metric and kind over retained data. There is no pagination or truncation indicator for this bounded discovery list.

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/metrics?limit=100' \
  --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

limitquery · integeroptional

Defaults to 500 for absent, malformed or nonpositive input; capped at 1000.

Default 500

Responses

Expand a response to inspect its headers and complete schema.

200The tenant's metrics.

The tenant's metrics.

application/json

metricsMetricSummary[]optional
Array items · MetricSummaryMetricSummary ↗
Object properties
metricstringoptional
kindstringoptional
series_countintegeroptional

Distinct label combinations seen for this metric.

oldest_windowstringoptional
Format date-time
newest_windowstringoptional
Format date-time

Illustrative response

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

json
{
  "metrics": [
    {
      "metric": "http.requests",
      "kind": "counter",
      "series_count": 1,
      "oldest_window": "2026-10-02T12:00:00Z",
      "newest_window": "2026-10-02T12:14:00Z"
    }
  ]
}
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.

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.