folkwaysDocs
Platform API

Usage

Read a workspace's or segment's connections and traffic over time, and the current period's usage against its allowances.

Two kinds of report:

  • Usage over a range (/usage): connections and traffic in time buckets, for charts.
  • The current period (/usage/period): the billing totals for this month's period, against the allowances.

Workspace usage

HTTP
GET /api/v1/organizations/{workspaceId}/usage?from=2026-11-24T00:00:00Z&to=2026-12-01T00:00:00Z
X-API-Key: <key with workspace access>
QueryDefaultMeaning
from, tothe last 24 hoursISO 8601 times. from before to, at most 400 days apart

The bucket size follows the range: 5 minutes up to 6 hours, 1 hour up to 3 days, 1 day beyond.

data:

FieldMeaning
from, to, bucketThe range and bucket size
collectingtrue while live figures are arriving. When false, current values are zero
connectionsConnections open now
messagesTodayPublishes accepted since 00:00 UTC
messagesIn, messagesOutMessages published and delivered in the range
bytesIn, bytesOutBytes in and out in the range
seriesPer bucket: start, connections (the bucket's peak), messagesIn, messagesOut, bytesIn, bytesOut
segmentsPer segment: segmentId, name, connections and topics now, messagesIn, messagesOut, bytesIn, bytesOut

Segment usage

HTTP
GET /api/v1/segments/{segmentId}/usage
X-API-Key: <key with access to the segment>

The same query and report, for one segment.

Current period

HTTP
GET /api/v1/organizations/{workspaceId}/usage/period
X-API-Key: <key with workspace access>

The billing record for the current monthly period:

FieldMeaning
periodStart, periodEndThe current period
used.messagesEvery publish plus every delivery
used.dataTransferBytesBytes in plus out, framing included
used.peakConnectionsThe busiest minute's connections
used.framedBytesIn, used.framedBytesOut, used.payloadBytesIn, used.payloadBytesOutThe traffic, with and without protocol framing
used.connectionMinutesConnection time, for information; not billed
used.publishesBlockedPublishes refused because an allowance or cap was used up
allowancesThe package's peakConnections, messages and dataTransferBytes for the period; a missing one isn't limited
graceUntilWhen a running grace period ends, if one is running
JSON
{
  "status": "SUCCESS",
  "data": {
    "allowances": { "dataTransferBytes": 53687091200, "messages": 20000000, "peakConnections": 1000 },
    "periodEnd": "2026-12-17T00:00:00.000Z",
    "periodStart": "2026-11-17T00:00:00.000Z",
    "used": { "dataTransferBytes": 1849120544, "messages": 4210388, "peakConnections": 312, "publishesBlocked": 0 }
  },
  "meta": { "requestId": "…", "timestamp": "…", "version": "v1" }
}

(Shortened.) Usage and limits explains how each meter counts and what grace means.

On this page