Public statistics of a set of triggers
const url = 'https://localhost:3000/api/v1/public/stats?trigger_ids=example';const options = {method: 'GET'};
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://localhost:3000/api/v1/public/stats?trigger_ids=example'Returns the stats buckets of the public triggers among trigger_ids (50 max), without authentication. Any other id (private or nonexistent trigger) is returned in skipped_trigger_ids without being distinguishable. Same buckets as GET /public/triggers/{id}/stats; window bounded to 30 days; a filter on a reserved _ key is rejected (400).
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Comma-separated trigger IDs (50 max)
Start (default: now-1h)
End (default: now)
Interval (default: 1m)
JSON filter on metadata (reserved _* keys rejected)
Responses
Section titled “Responses”Buckets per public trigger
object
SkippedTriggerIDs lists the requested trigger_ids that do not exist or that the caller may not read (the two cases are not told apart). Empty for the other scopes.
Triggers is keyed by trigger ID. A readable trigger without events has empty buckets.
object
object
Buckets holds only the time buckets that contain events, in time order.
object
Count is the number of events (with measure=sum:
Value is the sum of the key over the bucket, present with measure=sum:
Truncated is true when the scope holds more readable triggers than the cap (10000 for scope=all, 500 otherwise): only the oldest ones are read.
Example
{ "skipped_trigger_ids": [ "550e8400-e29b-41d4-a716-446655440000" ], "triggers": { "additionalProperty": { "buckets": [ { "count": 152, "time": "2024-01-15T10:00:00Z", "value": 1.25 } ] } }, "truncated": false}Invalid request
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Too many concurrent requests
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Erreur interne
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}Timeout
object
Example
{ "error": "invalid_request", "message": "Invalid request body"}