def list_event_types(
*,
timeout: float | None = None,
) -> EventTypesResourceasync def list_event_types(
*,
timeout: float | None = None,
) -> EventTypesResourceReturns the authoritative list of event names this API can deliver. eventTypes on create and update is validated against exactly this catalogue, so read it before you build a subscription UI or hardcode a name, because anything absent from it is a 400.
This one is not paginated. There is no limit or offset and no page envelope: totalCount is simply the length of eventTypes. The catalogue is global rather than per workspace, so it is safe to fetch once and cache for the process lifetime.
The payload your receiver gets wraps one of these names in a dict holding id, type, apiVersion, createdAt, workspaceId, actor and data, where data is the per event body. Read type to route, not the URL you registered.
Example
from envless import envless
catalogue = envless.webhooks.list_event_types()
print(catalogue['totalCount'])
print(
[
name
for name in catalogue['eventTypes']
if name.startswith('variable.')
]
)import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
catalogue = await envless.webhooks.list_event_types()
print(catalogue['totalCount'])
print(
[
name
for name in catalogue['eventTypes']
if name.startswith('variable.')
]
)
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
timeout | float | No | Seconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
EventTypesResource with eventTypes and totalCount.
Worth knowing
- Treat the live response as the source of truth, the enum in the reference docs is only a snapshot.
- Refused for project fenced keys even though the catalogue is not workspace specific.
Required scopes
webhooks:read
Underlying endpoint
GET /webhooks/event-types
Request and response schema, every error code, and a live playground.
In TypeScript
envless.webhooks.listEventTypes()
The same method in @goenvless/sdk, with the same request, retries and errors.