folkwaysDocs
Platform API

Segments

GET /segments/{segmentId}: read a segment's settings, its overrides and the limits actually in force.

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

The segment object

FieldMeaning
id, name, description, organizationIdThe segment and its workspace
environmentPRODUCTION, STAGING or DEVELOPMENT
activefalse when the segment is turned off
websocketEnabled, httpEnabledWhich transports it accepts
limitsYour overrides only; a missing field follows the package
effectiveLimitsWhat is enforced: maxConnections, maxPayloadBytes, maxTopics, maxPublishPerSec
presetThe rate preset: GENERAL, AI_STREAMING, CHAT, LIVE_DASHBOARD or IOT
rateLimitsYour rate-limit overrides only
effectiveRateLimitsWhat is enforced: the preset's limits, scaled to your package and lowered by your overrides
capsMonthly caps: maxMessages, maxDataTransferBytes, action (STOP, CONTINUE, CONTINUE_WITH_EXTRA), extraPercent
identityPolicyWho may connect: allowAnonymous, maxAnonymousConnections, maxConnectionsPerIdentity, onIdentityLimit (EVICT_OLDEST or REJECT)
signingKeyCount, topicRuleCountHow many keys and rules it has
createdAt, updatedAtTimestamps

Rate-limit fields, in both rateLimits and effectiveRateLimits: publishPerSec, publishBurst, topicPublishPerSec, topicPublishBurst, segmentPublishPerSec, segmentPublishBurst, inboundBytesPerSec, outboundBytesPerSec, maxSubscribersPerTopic, subscribesPerMin, topicCreatesPerMin, newConnectionsPerMin. See Limits for what each means.

effectiveLimits and effectiveRateLimits are always complete: overrides are capped at the package, so a downgrade never leaves a segment above its new package.

JSON
{
  "status": "SUCCESS",
  "data": {
    "active": true,
    "effectiveLimits": { "maxConnections": 1000, "maxPayloadBytes": 61440, "maxPublishPerSec": 20, "maxTopics": 2000 },
    "environment": "PRODUCTION",
    "httpEnabled": true,
    "id": "6f1c2a0e-0000-4000-8000-000000000001",
    "identityPolicy": { "allowAnonymous": false, "maxAnonymousConnections": 0, "maxConnectionsPerIdentity": 0, "onIdentityLimit": "EVICT_OLDEST" },
    "name": "Chat (production)",
    "preset": "CHAT",
    "signingKeyCount": 1,
    "topicRuleCount": 3,
    "websocketEnabled": true
  },
  "meta": { "requestId": "…", "timestamp": "…", "version": "v1" }
}

(Shortened. Values depend on your package and settings.)

On this page