fluxgatedocs
Dashboard ↗GitHub

Submit metric points

POST/v1/ingest
Bearer API keyIngestion serviceAPI 1.0.0

Accepts up to 1000 points per request. Points are validated individually; valid ones are admitted even when others in the same batch fail.

Quota is metered in points per second, not requests per second, so batching does not change how much of a tenant's allowance a given volume of data consumes.

Base URL

These addresses are for local development. Replace them with your own deployed service URLs.

http://localhost:8080 Local ingest API; replace with the deployed ingest 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 POST 'http://localhost:8080/v1/ingest' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <UNIQUE_BATCH_KEY>' \
  --data '{"points":[{"metric":"http.requests","kind":"counter","value":1,"labels":{"service":"checkout"}}]}'

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

Idempotency-Keyheader · stringoptional

An opaque, client-chosen identifier for this batch. Repeating a request with the same key and the same body replays the original response instead of processing the batch again. The default lifetime is 24 hours from initial reservation. Preserve exact body bytes across ambiguous failures; a new key can duplicate a publish.

Max length 255Pattern ^[\x21-\x7e]+$

Example: batch-2026-09-03T12:00:00Z-0001

Request body

Required. application/json

IngestRequest ↗
pointsPoint[]required
Min items 1Max items 1000
Array items · PointPoint ↗

Unknown fields are rejected rather than ignored, so a typo such as timestmap is reported immediately instead of silently dropping data.

Object properties
metricstringrequired

Dotted metric name. Must start with a letter or underscore; trailing dots and doubled dots are rejected.

Max length 200Pattern ^[a-zA-Z_][a-zA-Z0-9_.\-]*$
kindstringrequired

gauge moves in any direction, counter is a nonnegative increment (not a cumulative total) and must not be negative, histogram is an observation to be bucketed.

"gauge" "counter" "histogram"
valuenumberrequired

Required, finite, and at most 1e100 in absolute value. Null is rejected. NaN and the infinities are rejected: a single one poisons every aggregate it reaches, with nothing left to identify which point caused it.

Format doubleMinimum -1e+100Maximum 1e+100
timestampstring | nulloptional

RFC 3339. Defaults to the arrival time when omitted or null. May be up to 5 minutes in the future to tolerate client clock drift, and up to 7 days in the past by default. Accepted late observations can correct an older window; window closure is not a finality guarantee.

Format date-time
labelsobject | nulloptional

Dimensions to break the metric down by. The 20-label ceiling is the tightest limit in the API: cardinality is multiplicative, and an unbounded label set is the fastest way to make a time-series store unqueryable. Keys beginning __ are reserved by the platform. Omitted or null means an empty label set. Values are limited to 256 UTF-8 bytes (in addition to the schema character ceiling) and must not contain control characters.

Max properties 20
Additional values · string
Max length 256
Property name constraints
Max length 64Pattern ^[a-zA-Z_][a-zA-Z0-9_]*$

Unknown properties are rejected.

Unknown properties are rejected.

Three points of different kinds

Illustrative payload. If sending a timestamp, update it to a value within your configured acceptance window.

json
{
  "points": [
    {
      "metric": "http.request.duration_ms",
      "kind": "histogram",
      "value": 12.5,
      "timestamp": "2026-09-03T12:00:00Z",
      "labels": {
        "service": "checkout",
        "region": "us-central1"
      }
    },
    {
      "metric": "http.requests",
      "kind": "counter",
      "value": 1,
      "labels": {
        "service": "checkout",
        "status": "200"
      }
    },
    {
      "metric": "queue.depth",
      "kind": "gauge",
      "value": 42
    }
  ]
}

Responses

Expand a response to inspect its headers and complete schema.

202The batch was accepted for delivery. Inspect `rejected` and

The batch was accepted for delivery. Inspect rejected and errors: some points may have been dropped.

Response headers

X-Request-Idstring

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

X-RateLimit-Limitnumber

The sustained allowance in points per second.

X-RateLimit-Remaininginteger

Points still available in the burst allowance.

X-RateLimit-Resetinteger

Seconds until the allowance is fully replenished.

Idempotency-Replayedstring

Present and true when this response was replayed from a stored outcome.

"true"

application/json

IngestResponse ↗
batch_idstringrequired

Identifies the accepted batch downstream.

acceptedintegerrequired

Points admitted to the pipeline.

rejectedintegerrequired

Points that failed validation. Always exact.

errorsFieldError[]optional

The individual failures, capped at 100 entries so a response cannot dwarf the request that produced it.

Max items 100
Array items · FieldErrorFieldError ↗
Object properties
fieldstringrequired

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

messagestringrequired

What the submitter must change.

errors_truncatedbooleanoptional

True when more than 100 field violations occurred. One rejected point can have several violations, so errors length need not equal rejected.

Every point admitted

json
{
  "batch_id": "9f2c1a4be6d84f0fa1c3e7b25d908146",
  "accepted": 3,
  "rejected": 0
}

One point rejected

json
{
  "batch_id": "9f2c1a4be6d84f0fa1c3e7b25d908146",
  "accepted": 2,
  "rejected": 1,
  "errors": [
    {
      "field": "points.1.metric",
      "message": "contains \" \" at position 4; use letters, digits, '_', '.' and '-', starting with a letter or '_'"
    }
  ]
}
400The body could not be parsed, or a header was malformed.

The body could not be parsed, or a header was malformed.

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.

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.

409The `Idempotency-Key` was already used with a different body.

The Idempotency-Key was already used with a different body.

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.

413The request body exceeded the size limit.

The request body exceeded the size limit.

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.

415The `Content-Type` was not `application/json`.

The Content-Type was not application/json.

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.

422The batch was structurally valid but semantically unusable: it was

The batch was structurally valid but semantically unusable: it was empty, exceeded the point limit, or every point failed validation.

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.

429The tenant's quota is exhausted. `Retry-After` says when to try

The tenant's quota is exhausted. Retry-After says when to try again; its absence means the batch is larger than the burst allowance will ever hold and must be split instead.

Response headers

Retry-Afterinteger

Seconds to wait before retrying. Absent when retrying cannot help because the batch exceeds the burst allowance.

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 internal failure; preserve retry identity for ambiguous writes.

An internal failure; preserve retry identity for ambiguous writes.

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 or a dependency -- the broker, the retry store, or the

Capacity or a dependency -- the broker, the retry store, or the shared rate-limit store -- prevented confirmation. Publication may already have happened. Retry with the same Idempotency-Key and identical body; respect Retry-After when present.

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.

504The request exceeded its processing deadline.

The request exceeded its processing deadline.

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.