def get(id, timeout: nil)def get: (String id, ?timeout: seconds?) -> webhook_resourceReturns a single endpoint with its URL, subscription list, enabled flag and health timestamps. The signing secret is not here and never will be: you get secretLastFour only, so you can tell which secret a receiver holds. If the secret is lost, rotate_secret is the only route back to a working one.
lastSuccessAt and lastFailureAt are the fastest health signal. When one of them looks wrong, list_deliveries holds the detail behind it.
Endpoints are addressed by id alone, a UUIDv7, with no slug form. Passing a name resolves nothing and produces 404 webhook.not_found, the same response as a deleted endpoint.
Example
require "envless/sdk"
endpoint_id = "0194f2b1-9c3a-7c21-8f0e-2b6d4a1c5e90"
hook = Envless.webhooks.get(endpoint_id)
puts "#{hook[:enabled]} #{hook[:secretLastFour]}"
puts "#{hook[:lastSuccessAt]} #{hook[:lastFailureAt]}"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Endpoint id taken from a list call, ids only. |
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
webhook_resource with eventTypes, enabled, secretLastFour and the last success and failure timestamps.
Worth knowing
- The event type catalogue lives at its own route, so
list_event_typescan never collide with an id read. - A 404 does not distinguish an unknown id from an endpoint in another workspace.
Required scopes
webhooks:read
Underlying endpoint
GET /webhooks/{id}
Request and response schema, every error code, and a live playground.
In TypeScript
envless.webhooks.get()
The same method in @goenvless/sdk, with the same request, retries and errors.