Skip to main content
Use 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:
Run occtoo events types to see the event types and what a filter can compare for each.

Watch live events

Prints events as they happen, until you press Ctrl-C. The stream reconnects by itself and continues after the last event it showed.

Read past events

Reads the events Occtoo has kept, oldest first. To continue where a run stopped, pass the sequence of its last event to --after. occtoo events subscribe --after continues the same way and then keeps listening.

Find out what there is

  • metadata shows how many events Occtoo has kept and where they start and end. It takes --filter.
  • types lists 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.
You can name a destination by its id or its name.

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.
For 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.
Prints the next batch and acknowledges it. To handle a batch before you acknowledge it, take it as JSON and acknowledge it afterwards:
With --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.