AdminBrowse an aggregate's R2 event stream (paginated, filterable)

Browse an aggregate's R2 event stream (paginated, filterable)

Returns the ordered R2 event stream for an aggregate with version-range (fromVersion/toVersion) and event-type filters, forward cursor pagination, and the latest snapshot version. type accepts the canonical aggregate type (e.g. LockAggregate) or its slug (e.g. lock). Read-only; requires dual admin auth (X-Admin-API-Key + JWT). Audit-logged.

curl -X GET "https://api.spkey.co/admin/aggregates/example_string/example_string/events?fromVersion=42&toVersion=42&type=example_string&limit=42&cursor=null" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "aggregateType": "example_string",
  "aggregateId": "example_string",
  "totalEvents": 3.14,
  "snapshot": "null",
  "events": [
    {
      "version": 3.14,
      "type": "example_string",
      "timestamp": "example_string",
      "orgId": "example_string",
      "event": "null"
    }
  ],
  "nextCursor": "null",
  "filter": {
    "fromVersion": "null",
    "toVersion": "null",
    "type": "null"
  }
}
GET
/admin/aggregates/{type}/{id}/events
GET
Base URLstring

Target server for requests. Edit to use your own host.

⚠️Authentication configuration error - security schemes not found
path
typestring
Required

Aggregate type or slug, e.g. "lock" or "LockAggregate"

path
idstring
Required

Aggregate id (== state.id used for DO routing)

query
fromVersioninteger

Only return events with version >= fromVersion (inclusive).

Min: 1
query
toVersioninteger

Only return events with version <= toVersion (inclusive).

Min: 1
query
typestring

Only return events whose type matches this exact event-type string.

query
limitinteger

Max events to return in this page (default 100).

Min: 1 • Max: 500
query
cursorintegernull

Pagination cursor: return events with version > cursor. Use nextCursor from the previous page.

Min: 0
Request Preview
Response

Response will appear here after sending the request

Path Parameters

typestring
Required

Aggregate type or slug, e.g. "lock" or "LockAggregate"

idstring
Required

Aggregate id (== state.id used for DO routing)

Query Parameters

fromVersioninteger

Only return events with version >= fromVersion (inclusive).

toVersioninteger

Only return events with version <= toVersion (inclusive).

typestring

Only return events whose type matches this exact event-type string.

limitinteger

Max events to return in this page (default 100).

cursorinteger,null

Pagination cursor: return events with version > cursor. Use nextCursor from the previous page.

Responses

aggregateTypestring
Required
aggregateIdstring
Required
totalEventsnumber
Required
snapshotobject,null
Required
eventsarray
Required
nextCursornumber,null
Required
filterobject
Required