Skip to content
中文

List event subscriptions

Code Mode: praxis.events.subscriptions.list

HTTP: GET /events/v1/subscriptions

See which subscriptions you still have waiting, for example to avoid subscribing twice to the same run or to find an id to delete. Only subscriptions you created, in your organization, that have not expired are listed. The list is one page of at most limit entries: next_cursor is always null today. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter or a limit outside 1 to 100.

Signature

praxis.events.subscriptions.list(args?:{query?:{limit?:number}}):Promise<{/** The subscriptions, at most limit. */ data:Array<{/** The subscription id, esub_...; use it to retrieve or delete it. */ id:string;/** The tenant event types it listens to. */ types:Array<string>;/** The conditions that must all hold; empty means every event of the types. */ filters:Array<{/** The attribute equals the value, for example { subject: "runs/run_1" } or { "data.status": "faulted" }. */ exact?:{[key:string]:string};/** The attribute starts with the value, for example { subject: "runs/" }. */ prefix?:{[key:string]:string}}>;/** The inbox address the letters go to, agent:<id> or human:<id>. */ sink:string;/** Whether the subscription ends after its first letter. */ once:boolean;/** When the subscription ends and stops matching, RFC 3339. */ expires_at:string;/** When the subscription was created, RFC 3339. */ created_at:string;/** The address that created it, agent:<id> or human:<id>; only that caller can see it. */ created_by:string}>;/** Always null today; the list is one page. */ next_cursor:string|null;/** Always false today; the list is one page. */ has_more:boolean}>;

Parameters

NameInTypeRequiredDescription
limitquerynumbernoMaximum subscriptions to return, from 1 to 100; defaults to 50.

Responses

StatusContent typesDescription
200application/jsonYour live subscriptions.
400application/problem+jsonUNSUPPORTED_FILTER_DIALECT means a filter used a form other than exact and prefix; INVALID_PARAMS means a field, type, filter name, count, date or query value is not accepted, and the message names it. Correct the request; retrying it unchanged fails again.
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.