Skip to content

Public statistics of a set of triggers

GET
/public/stats
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).

trigger_ids
required
string

Comma-separated trigger IDs (50 max)

from
string

Start (default: now-1h)

to
string

End (default: now)

interval
string

Interval (default: 1m)

filter
string

JSON filter on metadata (reserved _* keys rejected)

Buckets per public trigger

Media typeapplication/json
object
skipped_trigger_ids
required

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.

Array<string>
triggers
required

Triggers is keyed by trigger ID. A readable trigger without events has empty buckets.

object
key
additional properties
object
buckets
required

Buckets holds only the time buckets that contain events, in time order.

Array<object>
object
count
required

Count is the number of events (with measure=sum:, of those carrying a numeric key).

integer
time
required
string
value

Value is the sum of the key over the bucket, present with measure=sum: only.

number
truncated
required

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.

boolean

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

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Too many concurrent requests

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Erreur interne

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Timeout

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}