Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Per-topic consumer lag for a destination

Current consumer lag per topic (default), or lag at a point in time when at is given. Values are totals: one sample per partition, summed per topic and across topics, so they can be reconciled with alerts. at within the last 2 days is served at minute resolution, within 14 days at hour resolution; older or future values return HTTP 400. When no sample exists near at the response carries resolution: null and a message instead of zeros. latency_ms is best-effort and only available in current mode. at without a timezone is treated as UTC. Destinations list every topic their consumer group reports, including topics without a stored record.

GET/destinations/{destination_id}/lag
Authorization
AuthorizationBearer token · headerrequired
Path parameters
destination_idstringrequired
Query parameters
atstring<date-time>

Point in time (ISO 8601). Omit for current lag.

topic_namestring

Case-insensitive substring filter on the topic name

sortstring
default: "lag"
Allowed:lagnamelatency
sort_dirstring
default: "desc"
Allowed:ascdesc
pageinteger
min 1 · default: 1
page_sizeinteger
min 1 · max 200 · default: 25
include_partitionsboolean

Return the per-partition breakdown for each topic

default: false
Responses
200

Successful Response

entity_typestringrequired
entity_idstringrequired
connector_namestringrequired
supportedbooleanrequired

False for connectors that expose no consumer lag (kafkadirect)

modestringrequired
Allowed:currenthistorical
requested_atstring<date-time> | null

Echo of the at query parameter

Show properties
Any of:
string<date-time>
string<date-time>
null
null
as_ofstring<date-time> | null

Observation time actually used for the values

Show properties
Any of:
string<date-time>
string<date-time>
null
null
resolutionstring | null

raw (current), minute (<= 2d), hour (<= 14d); null when no data was found

Show properties
Any of:
string
string
null
null
stalebooleanrequired

Current mode: newest sample is older than the stale threshold or missing

messagestring | null

Human-readable note when data is missing or unsupported

Show properties
Any of:
string
string
null
null
overallLagOverallResrequired
Show properties
lagintegerrequired

Total lag across every topic and partition

latency_msinteger | null

Worst partition latency across topics; current mode only

Show properties
Any of:
integer
integer
null
null
topic_countintegerrequired

Topics resolved for the entity (before topic_name filtering)

topics_with_lagintegerrequired

Topics whose lag is > 0

topicsLagTopicRes[]required
Show properties
Array of LagTopicRes
topicstringrequired

Display name: the stored topic_id when known, otherwise the Kafka label

topic_idstring | null

topics collection id when the topic has a record

Show properties
Any of:
string
string
null
null
kafka_topicstringrequired

Topic label as written by the JMX scrape (dots replaced by underscores)

producer_typestring | null

sources | transforms | null when unknown

Show properties
Any of:
string
string
null
null
lagintegerrequired

Sum of partition lag, one value per partition

sharenumberrequired

lag / overall.lag, 0 when overall is 0

partition_countintegerrequired
max_partition_lagintegerrequired
latency_msinteger | null

Worst partition latency; current mode only

Show properties
Any of:
integer
integer
null
null
partitionsLagPartitionRes[] | null

Only with include_partitions=true

Show properties
Any of:
LagPartitionRes[]
Array of LagPartitionRes
partitionstringrequired
lagintegerrequired

Records behind the log end offset for this partition

latency_msinteger | null

Wall-clock age of the oldest unconsumed record

Show properties
Any of:
integer
integer
null
null
null
null
totalintegerrequired

Topics matching the filter, before pagination

pageintegerrequired
page_sizeintegerrequired
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X GET 'https://api.streamkap.com/destinations/string/lag' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "entity_type": "string",
  "entity_id": "string",
  "connector_name": "string",
  "supported": true,
  "mode": "current",
  "requested_at": "2019-08-24T14:15:22Z",
  "as_of": "2019-08-24T14:15:22Z",
  "resolution": "raw",
  "stale": true,
  "message": "string",
  "overall": {
    "lag": 0,
    "latency_ms": 0,
    "topic_count": 0,
    "topics_with_lag": 0
  },
  "topics": [
    {
      "topic": "string",
      "topic_id": "string",
      "kafka_topic": "string",
      "producer_type": "string",
      "lag": 0,
      "share": 0,
      "partition_count": 0,
      "max_partition_lag": 0,
      "latency_ms": 0,
      "partitions": [
        {
          "partition": "string",
          "lag": 0,
          "latency_ms": 0
        }
      ]
    }
  ],
  "total": 0,
  "page": 0,
  "page_size": 0
}