occtoo events to watch what happens in your organization as it happens, read the events Occtoo has kept, and manage event destinations. See the Events API for the event types and their payloads.
Filters
subscribe, list and metadata take --filter, and event destinations have a filter too. A filter uses eq, and, or, parentheses and double-quoted strings:
occtoo events types to see the event types and what a filter can compare for each.
Watch live events
Read past events
sequence of its last event to --after. occtoo events subscribe --after continues the same way and then keeps listening.
Find out what there is
metadatashows how many events Occtoo has kept and where they start and end. It takes--filter.typeslists the event types and what a filter can compare for each.schema <TYPE>prints the JSON Schema of the payload of an event type.--version <major.minor>prints an earlier version.
Event destinations
An event destination receives the events that match its filter. It is one of four types:Webhook: Occtoo calls an HTTPS address.AzureStorageQueue: Occtoo writes to an Azure Storage queue.AzureServiceBus: Occtoo writes to an Azure Service Bus queue or topic.DurableConsumer: your own workers pull events in batches.
Create a destination
type can’t change later. configuration holds the settings of the type, and a durable consumer takes none:
- Every branch of the filter has to name a type.
- Only events that happen after the destination is active are delivered.
- A webhook delivers nothing until you run
verify. Its signing secret is printed once, when you create it. - A connection string is a secret. In a terminal it is asked for without echo. Otherwise, pipe the JSON in rather than keeping it in a file. It is never a flag.
edit, every field is optional. A new webhook address has to be verified again.
Deliveries
--failed shows only deliveries that failed, with the error of their last attempt. --limit defaults to 50. Occtoo keeps delivered events for an hour and failed ones for seven days. A durable consumer has no deliveries.
Durable consumers
A durable consumer hands out events in batches that you have to acknowledge. See Durable consumers for how they work.--output json, the batch is one document: {"leaseId", "generation", "attempt", "events"}. pull prints nothing when there are no new events.
Acknowledge a batch within the visibility time, or its events are handed out again. If you can’t handle a batch, run
ack with --failed to have it handed out again right away.