Watch
A Watch is an outbound subscription that delivers the Events a selector matches to a URL, signed, retried, and replayable.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
selector | string | required | The Event selector, such as Order.placed. |
url | url | required | Where deliveries go. |
payload | string | One of full, or thin: the record as the Action left it, or only its versioned address. The default is full. |
Object
{
"$id": "https: //api.sb/ patentpad.com/ watches/ watch_1",
"$type": "Watch",
"selector": "Example selector",
"url": "https: //patentpad.com",
"payload": "full"
}Relationships
- A Watch delivers many Events: a Watch delivers each matching Event to its URL, signed, retried and replayable.
delivers, inversedeliveredBy.
Verbs
createCreates a Watch.POST /{namespace}/watchesgetReturns one Watch by id.GET /{namespace}/watches/{id}listReturns Watches, newest first, one page at a time.GET /{namespace}/watchesupdateChanges the given properties of a Watch.PATCH /{namespace}/watches/{id}deleteDeletes a Watch; its history is kept.DELETE /{namespace}/watches/{id}pausePause stops a Watch delivering while its Events keep queuing; the platform pauses a Watch whose deliveries fail for three days.POST /{namespace}/watches/{watch}/pausereplayReplay redelivers a Watch’s Events from a chosen point, signed as they were the first time.POST /{namespace}/watches/{watch}/replayresumeResume restarts a paused Watch and delivers the Events it held, oldest first.POST /{namespace}/watches/{watch}/resumerotateRotate issues a new signing secret for a Watch and signs with both secrets until the old one expires.POST /{namespace}/watches/{watch}/rotate
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
Watch.create | Yes | Yes | Yes | No |
Watch.get | Yes | Yes | Yes | Yes |
Watch.list | Yes | Yes | Yes | Yes |
Watch.update | Yes | Yes | Yes | No |
Watch.delete | Yes | Yes | Yes | No |
Watch.pause | Yes | Yes | Yes | No |
Watch.replay | Yes | Yes | Yes | No |
Watch.resume | Yes | Yes | Yes | No |
Watch.rotate | Yes | Yes | Yes | No |
Call it
Replay the latest watch.Example
A dental group registers a Watch for Reminder.confirmed Events to https:. Each delivery is signed, retried on failure, and replayable after an outage.