Webhooks

envless.webhooks.list()

List the webhook endpoints in the workspace

def list(
    *,
    limit: int | None = None,
    offset: int | None = None,
    search: str | None = None,
    order: str | None = None,
    timeout: float | None = None,
) -> Page[WebhookResource]

Returns one page of the live webhook endpoints. Signing secrets are never part of a read, so every row carries only secretLastFour, which is enough to confirm which secret a receiver is verifying against and nothing more.

Ordering defaults to name, A to Z. order= set to asc or desc switches to createdAt, oldest or newest first, and any other value falls back to name order. search= matches name, url and description together.

Every method in this namespace, this read included, is refused with 403 auth.key_project_restricted when the calling key is fenced to specific projects. Endpoints are workspace wide and subscribe to workspace wide events, so authenticate with a key that has no projectIds fence.

Example

from envless import envless

page = envless.webhooks.list(search='billing')

print(
    [(hook['url'], hook['enabled']) for hook in page['items']]
)
print(page['pagination']['totalCount'])

Parameters

ParameterTypeRequiredDescription
limitintNoRows per page, a whole number from 1 to 100.
offsetintNoWhole number of endpoints to skip before the page starts.
searchstrNoCase insensitive substring match across name, url and description.
orderstrNoDefaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt.
timeoutfloatNoSeconds 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

Page[WebhookResource] with items and a pagination envelope counting every live endpoint.

Reads the webhooks collection. list returns one page as a dict with items and pagination, list_all collects every page into a list, and iterate yields one item at a time, fetching the next page only when the loop reaches it. On AsyncEnvless, iterate is an async iterator for async for.

Worth knowing

  • Deleted endpoints are excluded permanently and their ids are never reused.
  • A workspace is capped at 20 endpoints, so one page of 100 always holds the whole set.

Required scopes

webhooks:read

Underlying endpoint

GET /webhooks

Request and response schema, every error code, and a live playground.

In TypeScript

envless.webhooks.list()

The same method in @goenvless/sdk, with the same request, retries and errors.