Subscribe to stratos events. When 'did' is provided, subscribes to record updates for that account. When omitted, subscribes to service-level events (enrollments). Callers must authenticate with a signed service JWT via the Authorization: Bearer header.
Parameters
The last known event sequence number to resume from.
The DID of the account to subscribe to. If omitted, subscribes to service-level enrollment events.
Optional domain filter. Only events for records with this domain in their boundary will be emitted.
Errors
FutureCursor
Cursor is in the future.
AuthRequired
Authentication is required.
View raw schema
{
"description": "Subscribe to stratos events. When 'did' is provided, subscribes to record updates for that account. When omitted, subscribes to service-level events (enrollments). Callers must authenticate with a signed service JWT via the Authorization: Bearer header.",
"errors": [
{
"description": "Cursor is in the future.",
"name": "FutureCursor"
},
{
"description": "Authentication is required.",
"name": "AuthRequired"
}
],
"message": {
"schema": {
"refs": [
"#commit",
"#enrollment",
"#info"
],
"type": "union"
}
},
"parameters": {
"properties": {
"cursor": {
"description": "The last known event sequence number to resume from.",
"type": "integer"
},
"did": {
"description": "The DID of the account to subscribe to. If omitted, subscribes to service-level enrollment events.",
"format": "did",
"type": "string"
},
"domain": {
"description": "Optional domain filter. Only events for records with this domain in their boundary will be emitted.",
"maxLength": 253,
"type": "string"
}
},
"type": "params"
},
"type": "subscription"
}
A commit event containing record operations.
Properties
List of record operations in this commit.
The sequence number of this event.
Timestamp of when the event was sequenced.
View raw schema
{
"description": "A commit event containing record operations.",
"properties": {
"did": {
"description": "The DID of the account.",
"format": "did",
"type": "string"
},
"ops": {
"description": "List of record operations in this commit.",
"items": {
"ref": "#recordOp",
"type": "ref"
},
"type": "array"
},
"rev": {
"description": "The repo revision.",
"format": "tid",
"type": "string"
},
"seq": {
"description": "The sequence number of this event.",
"type": "integer"
},
"time": {
"description": "Timestamp of when the event was sequenced.",
"format": "datetime",
"type": "string"
}
},
"required": [
"seq",
"did",
"time",
"rev",
"ops"
],
"type": "object"
}
An enrollment event indicating a user has enrolled or unenrolled from the service.
Properties
The enrollment action.
maxLength: 32 bytes
Known values: enroll, unenroll
The boundaries assigned to the user.
The Stratos service endpoint URL.
Timestamp of the enrollment event.
View raw schema
{
"description": "An enrollment event indicating a user has enrolled or unenrolled from the service.",
"properties": {
"action": {
"description": "The enrollment action.",
"knownValues": [
"enroll",
"unenroll"
],
"maxLength": 32,
"type": "string"
},
"boundaries": {
"description": "The boundaries assigned to the user.",
"items": {
"type": "string"
},
"type": "array"
},
"did": {
"description": "The DID of the user.",
"format": "did",
"type": "string"
},
"service": {
"description": "The Stratos service endpoint URL.",
"format": "uri",
"type": "string"
},
"time": {
"description": "Timestamp of the enrollment event.",
"format": "datetime",
"type": "string"
}
},
"required": [
"did",
"action",
"time"
],
"type": "object"
}
An informational message about the subscription state.
Properties
Additional details about the info message.
maxLength: 1024 bytes
The type of info message.
maxLength: 128 bytes
Known values: OutdatedCursor
View raw schema
{
"description": "An informational message about the subscription state.",
"properties": {
"message": {
"description": "Additional details about the info message.",
"maxLength": 1024,
"type": "string"
},
"name": {
"description": "The type of info message.",
"knownValues": [
"OutdatedCursor"
],
"maxLength": 128,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
}
A single record operation within a commit.
Properties
The type of operation.
maxLength: 32 bytes
Known values: create, update, delete
The CID of the record. Present for create and update operations.
The record path (collection/rkey).
maxLength: 512 bytes
The record content. Present for create and update operations.
View raw schema
{
"description": "A single record operation within a commit.",
"properties": {
"action": {
"description": "The type of operation.",
"knownValues": [
"create",
"update",
"delete"
],
"maxLength": 32,
"type": "string"
},
"cid": {
"description": "The CID of the record. Present for create and update operations.",
"type": "cid-link"
},
"path": {
"description": "The record path (collection/rkey).",
"maxLength": 512,
"type": "string"
},
"record": {
"description": "The record content. Present for create and update operations.",
"type": "unknown"
}
},
"required": [
"action",
"path"
],
"type": "object"
}