def list(limit: nil, offset: nil, search: nil, order: nil, timeout: nil)def list: (
?limit: Integer?,
?offset: Integer?,
?search: (String | Symbol)?,
?order: ("name" | "asc" | "desc")?,
?timeout: seconds?
) -> Page[webhook_resource]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
require "envless/sdk"
page = Envless.webhooks.list(search: "billing")
page.items.each { |hook| puts "#{hook[:url]} #{hook[:enabled]}" }
puts page.pagination[:totalCount]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit: | Integer | No | Rows per page, a whole number from 1 to 100. |
offset: | Integer | No | Whole number of endpoints to skip before the page starts. |
search: | String | Symbol | No | Case insensitive substring match across name, url and description. |
order: | "name" | "asc" | "desc" | No | Defaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt. |
timeout: | Integer | Float | Rational | No | Seconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
Page[webhook_resource] with items and a pagination envelope counting every live endpoint.
Reads the webhooks collection. list returns one page as an Envless::Page with items and pagination, list_all collects every page into an array, and iterate yields one item at a time to a block, fetching the next page only when it gets there. Without a block, iterate returns an Enumerator.
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.