listWebhookEndpoints()
Returns webhook endpoints for one app as a paginated response, including endpoint subscription records for each endpoint.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function listWebhookEndpoints(appSlug: string) { const client = await wachtClient(); return client.webhooks.listWebhookEndpoints(appSlug, { limit: 25, offset: 0, include_inactive: true, });}Signature
function listWebhookEndpoints( appSlug: string, options?: { limit?: number; offset?: number; include_inactive?: boolean; },): Promise<PaginatedResponse<WebhookEndpoint>>Parameters
›appSlug?: string | undefined;
appSlug?: string | undefined;Slug of the webhook app whose endpoints should be listed.
›limit?: number | undefined;
limit?: number | undefined;Maximum number of endpoints to return for this page.
›offset?: number | undefined;
offset?: number | undefined;Number of endpoints to skip before returning results.
›include_inactive?: boolean | undefined;
include_inactive?: boolean | undefined;When `true`, includes inactive endpoints in page results.
Return value
›data?: WebhookEndpoint[] | undefined;
data?: WebhookEndpoint[] | undefined;Endpoints returned for the current page.
›id?: string | undefined;
id?: string | undefined;Stable endpoint identifier.
›deployment_id?: string | undefined;
deployment_id?: string | undefined;Deployment that owns the endpoint.
›app_slug?: string | undefined;
app_slug?: string | undefined;App slug that owns the endpoint.
›url?: string | undefined;
url?: string | undefined;Destination URL for webhook deliveries.
›description?: string | null | undefined;
description?: string | null | undefined;Endpoint description when configured.
›headers?: Record<string, string> | null | undefined;
headers?: Record<string, string> | null | undefined;Custom headers configured for delivery requests.
›is_active?: boolean | undefined;
is_active?: boolean | undefined;Whether the endpoint is active.
›max_retries?: number | undefined;
max_retries?: number | undefined;Maximum retry attempts for failed deliveries.
›timeout_seconds?: number | undefined;
timeout_seconds?: number | undefined;Delivery timeout in seconds.
›failure_count?: number | undefined;
failure_count?: number | undefined;Current failure counter for this endpoint.
›last_failure_at?: string | null | undefined;
last_failure_at?: string | null | undefined;Timestamp of the latest failure when one exists.
›auto_disabled?: boolean | undefined;
auto_disabled?: boolean | undefined;Whether endpoint auto-disable has been triggered.
›auto_disabled_at?: string | null | undefined;
auto_disabled_at?: string | null | undefined;Timestamp of auto-disable when one exists.
›rate_limit_config?: RateLimitConfig | null | undefined;
rate_limit_config?: RateLimitConfig | null | undefined;Optional per-endpoint rate limit configuration.
›subscriptions?: EventSubscription[] | undefined;
subscriptions?: EventSubscription[] | undefined;Event subscriptions attached to the endpoint.
›event_name?: string | undefined;
event_name?: string | undefined;Subscribed event name.
›filter_rules?: Record<string, unknown> | null | undefined;
filter_rules?: Record<string, unknown> | null | undefined;Optional filter rules for the event subscription.
›changed?: string[] | undefined;
changed?: string[] | undefined;Example rule: only include specific changed fields.
›has_more?: boolean | undefined;
has_more?: boolean | undefined;Whether another page exists after this one.
›limit?: number | undefined;
limit?: number | undefined;Effective page size reflected by backend response.
›offset?: number | undefined;
offset?: number | undefined;Effective offset reflected by backend response.
Behavior
- Returns a backend-scoped list response for this resource.
- Use pagination and filters from this method to build admin list views.
Examples
List active endpoints
import { wachtClient } from '@wacht/nextjs/server';export async function listActiveEndpoints(appSlug: string) { const client = await wachtClient(); return client.webhooks.listWebhookEndpoints(appSlug);}Paginate endpoint list for an admin table
import { wachtClient } from '@wacht/nextjs/server';export async function listEndpointsPage(appSlug: string, page: number, pageSize = 20) { const client = await wachtClient(); return client.webhooks.listWebhookEndpoints(appSlug, { limit: pageSize, offset: page * pageSize, include_inactive: true, });}