Skip to content

Read a source's activity

GET
/api/v1/channels/sources/{realmName}/{sourceName}/activity
curl --request GET \
--url http://localhost:11044/api/v1/channels/sources/example/example/activity \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Retained receipts and each approved consumer’s progress. Metadata only: no payloads, nothing delivered.

realmName
required
string

Name of the captured realm installed in the signed-in owner’s world; non-blank, at most 256 UTF-8 bytes, no control characters and not all * (400 otherwise). 404 when it has no live installation

sourceName
required
string

Source the realm declares, by the name the source list gives; same text rules as the realm name. A source that is undeclared or not approved is answered with a 503, not a 404

OK

Media type*/*

Metadata about one approved source’s journal: retained offsets, recent receipts and each approved consumer’s progress; never a payload. Answered by GET /channels/sources/{realmName}/{sourceName}/activity

object
consumers
required

Every approved consumer reading the source, from any realm installation, with its progress

Array<object>

One approved consumer of a source and how far it has read

object
installationId
required

The live installation of that realm

string
name
required

Name of the consumer, as its realm declares it

string
progress
required

The consumer’s position in the source’s journal

object
acknowledgedThroughOffset

Journal offset the consumer has checkpointed through: every record at or below it is acknowledged. A new cursor starts at the retained horizon, or at the end. Null when it has not adopted a cursor

integer format: int64
id
required

Consumer’s id in the journal

string
lag

Number of offsets between the consumer’s checkpoint and the journal’s end offset: how far behind it is. Null when it has not adopted a cursor

integer format: int64
lastAcknowledgedAt

When the consumer last acknowledged an offer; null before its first acknowledgement

string format: date-time
pending

Records offered to the consumer and not yet checkpointed through; null when no offer is outstanding

object
firstOffset
required

Journal offset of the offer’s first record

integer format: int64
itemCount
required

Number of records in the offer

integer format: int32
lastOffset
required

Journal offset of the offer’s last record

integer format: int64
realmName
required

Name of the realm that declares the consumer

string
revision
required

That installation’s revision

integer format: int64
triggerMode

Mode of the trigger that names this consumer and source, lowercase: observe or apply; null when no trigger names it

string
endOffset
required

Upper bound of the retained range, inclusive: the highest offset in the source’s journal

integer format: int64
receipts
required

Recent appends to the source, newest first

Array<object>

One recent append to a channel source: the receipt it was given and the offsets its items landed at. Listed newest first, at most 20, by GET /channels/sources/{realmName}/{sourceName}/activity

object
firstOffset

Lowest journal offset the batch’s items landed at; null when the batch carried no items

integer format: int64
id
required

Receipt id the append was answered with

string
itemCount
required

Number of items the batch appended

integer format: int32
lastOffset

Highest journal offset the batch’s items landed at; null when the batch carried no items

integer format: int64
retainedAfterOffset
required

Lower bound of the retained range, exclusive: records at offsets above this one, up to and including endOffset, are retained

integer format: int64
source
required

The source as its list entry shows it

object
digest
required

Digest of the realm snapshot the installation admitted, 64 lowercase hex characters

string
installationId
required

The live installation of that realm this was read from; send it back as installationId on a change

string
name
required

Name of the source: the stem of its sources/.yml file

string
realmName
required

Name of the realm that declares the source

string
revision
required

That installation’s revision; send it back as expectedRevision on a change

integer format: int64
sourceRevision

Revision of the source’s approval, which moves independently of the installation’s revision and is what a consumer grant names as sourceRevision; null while the source is not approved

integer format: int64
stream
required

Journal stream the source’s events are appended to; the same as name

string
type
required

Event type, the source name qualified by its realm: .

string