跳转到内容
EN

List event types

Code Mode: praxis.events.types.list

HTTP: GET /events/v1/types

Find which facts about your organization’s resources you can subscribe to, and which filters each one allows, before you create a subscription. Each entry is one event type at one schema version: type is what you pass in subscriptions.create types, data_schema describes the event’s data, and filterable lists the names a filter may use (subject, actor, and data.<field> for each top-level field of data_schema). Only tenant event types are listed; the list is generated from the platform’s event declarations, so a new tenant event appears here without an API change. When a breaking change publishes a new schemaversion, both versions are listed side by side. The list is one page: next_cursor is always null today. Read-only. Errors: 503 PROVIDER_UNAVAILABLE (retryable) when the catalog cannot be read right now; wait and call again.

签名

praxis.events.types.list(args?:Record<string,never>):Promise<{/** One entry per type and schema version. */ data:Array<{/** The event type name, for example automation.run.finished; pass it in the types of subscriptions.create. */ type:string;/** The version of this type's data schema. */ schemaversion:number;/** What the event means and when it is published. */ description?:string;/** JSON Schema of the event's data, the body of the letter a subscription writes. */ data_schema:{[key:string]:unknown};/** The names a filter of this type may use, always subject and actor, plus data.<field> for each top-level field of data_schema. */ filterable:Array<string>}>;/** Always null today; the list is one page. */ next_cursor:string|null;/** Always false today; the list is one page. */ has_more:boolean}>;

响应

状态码内容类型说明
200application/jsonThe tenant event types, one entry per type and schema version.
401application/problem+jsonUNAUTHENTICATED means the credential is missing or invalid; send a valid Praxis credential of your organization.
503application/problem+jsonPROVIDER_UNAVAILABLE with retryable true means the event catalog or the inbox service cannot answer right now; wait a few seconds and repeat the same call.