Webhooks

Envless.webhooks.list_all

Collect every webhook endpoint into one array

def list_all(limit: nil, offset: nil, search: nil, order: nil, timeout: nil)

Walks the pages and returns a flat array of every live endpoint. The 20 endpoint cap means this is a single request in practice, which makes it the normal way to load a settings screen.

The pagination envelope is dropped, so totalCount and hasMore are gone. Secrets are still absent from every row, so use create or rotate_secret if you need a usable secret rather than secretLastFour.

Example

ruby
require "envless/sdk"

hooks = Envless.webhooks.list_all

unhealthy = hooks.select do |hook|
  hook[:enabled] && hook[:lastFailureAt]
end

unhealthy.each do |hook|
  puts "#{hook[:id]} #{hook[:lastSuccessAt]}"
end

Parameters

ParameterTypeRequiredDescription
limit:IntegerNoPage size used while walking, capped at 100 and defaulting to 100.
offset:IntegerNoRow the walk starts from, so earlier endpoints are left out of the result.
search:String | SymbolNoCase insensitive substring match applied to every page.
order:"name" | "asc" | "desc"NoDefaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt.
timeout:Integer | Float | RationalNoSeconds 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

Array[webhook_resource] holding each live endpoint in the workspace.

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

  • A failure on any page fails the whole call and the rows already collected are lost.
  • Refused for project fenced keys, like every other method here.

Required scopes

webhooks:read

Underlying endpoint

GET /webhooks

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

In TypeScript

envless.webhooks.listAll()

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