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.
签名
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}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| limit | query | number | 否 | Maximum subscriptions to return, from 1 to 100; defaults to 50. |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | Your live subscriptions. |
| 400 | application/problem+json | UNSUPPORTED_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. |
| 401 | application/problem+json | UNAUTHENTICATED means the credential is missing or invalid; send a valid Praxis credential of your organization. |
| 503 | application/problem+json | PROVIDER_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. |