Get pull event metrics
const url = 'https://api.hookbridge.io/v1/pull-metrics?window=1h';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.hookbridge.io/v1/pull-metrics?window=1h' \ --header 'Authorization: Bearer <token>'Retrieve aggregated metrics for pull events including counts of stored and delivered events.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Time window for aggregation
Filter metrics by specific pull endpoint
Responses
Section titled “Responses”Pull metrics retrieved successfully
object
object
Time window for these metrics
Total number of messages in the window
Number of successfully delivered messages
Number of permanently failed messages
Total number of retry attempts
Ratio of succeeded messages to total messages
Average delivery latency in milliseconds
Average total delivery time (created_at to delivered_at) for succeeded messages
Average queue wait time (created_at to first_attempt_at) for attempted messages
object
Unique identifier for this request (useful for support)
Example
{ "data": { "window": "1h", "total_messages": 10000, "succeeded": 9950, "failed": 50, "retries": 150, "success_rate": 0.995, "avg_latency_ms": 185 }, "meta": { "request_id": "req_xyz123" }}Invalid request
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Examples
Endpoint not found
{ "error": { "code": "ENDPOINT_NOT_FOUND", "message": "endpoint not found" }, "meta": { "request_id": "req_xyz123" }}Invalid endpoint ID format
{ "error": { "code": "INVALID_REQUEST", "message": "endpoint_id must be in format ep_xxx" }, "meta": { "request_id": "req_xyz123" }}Invalid payload
{ "error": { "code": "INVALID_REQUEST", "message": "payload must be valid JSON" }, "meta": { "request_id": "req_xyz123" }}Invalid headers
{ "error": { "code": "INVALID_HEADERS", "message": "header 'Host' is forbidden and cannot be overridden" }, "meta": { "request_id": "req_xyz123" }}Unauthorized - Invalid or missing API key
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key" }, "meta": { "request_id": "req_xyz123" }}Enter your credentials to populate code examples throughout the docs.