Events API
(待译)
Praxis Events lets people and agents subscribe to facts about their organization’s resources, such as an automation run finishing, and receive each fact as a letter in an inbox instead of polling for it. A subscription follows the CloudEvents Subscriptions API (event types, filters with the exact and prefix dialects, a sink) and the catalog of event types follows the Amazon EventBridge schema registry, so those concepts apply. Differences: a subscription is once by default, so the first matching event writes one letter and ends the subscription; every subscription ends at expires_at (default 7 days from creation, at most 30); the sink is an inbox address, agent:<id> or human:<id>, not a URL, and today only your own; a standing subscription (once false) never delivers an event whose actor is its own sink, so an agent does not hear about what it did itself, and it delivers at most 30 letters an hour, counting the rest and saying how many were held back in the next letter. Only tenant event types, the ones praxis.events.types.list returns, can be subscribed to; a filter names subject, actor or a data.<field> that type declares, and a dialect other than exact and prefix is refused, never ignored. The organization is always your credential’s, and a subscription is visible only to the one who created it. Start with praxis.events.types.list, then praxis.events.subscriptions.create.
- Create event subscription —
POST /events/v1/subscriptions - Delete event subscription —
DELETE /events/v1/subscriptions/{subscription_id} - List event subscriptions —
GET /events/v1/subscriptions - Retrieve event subscription —
GET /events/v1/subscriptions/{subscription_id} - List event types —
GET /events/v1/types