Skip to content

Get group stats

GET
/groups/{id}/stats
curl --request GET \
--url https://localhost:3000/api/v1/groups/example/stats \
--header 'Authorization: <Authorization>'

Returns aggregated event statistics for all triggers in a group

id
required
string

Group ID (UUID)

from
string

Start time (default: now-1h)

to
string

End time (default: now)

interval
string

Bucket interval (default: 1m)

filter
string

JSON metadata filter

Group statistics

Media typeapplication/json
object
buckets
required
Array<object>
object
count
required
integer
time
required
string
value

Value is the sum of the key over the bucket; nil unless the query set SumKey.

number
from
required
string
group_id
required
string format: uuid
to
required
string
total
required
integer

Example generated

{
"buckets": [
{
"count": 1,
"time": "example",
"value": 1
}
],
"from": "example",
"group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"to": "example",
"total": 1
}

Invalid request

Media typeapplication/json
object
error
required
string
message
string

Example

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

Unauthorized

Media typeapplication/json
object
error
required
string
message
string

Example

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

Group not found

Media typeapplication/json
object
error
required
string
message
string

Example

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

Internal error

Media typeapplication/json
object
error
required
string
message
string

Example

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

Stats query timed out

Media typeapplication/json
object
error
required
string
message
string

Example

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