Events
Get usage analytics
Customers
Wallets
Invoices
Entitlements
Environments
Events
Features
Payments
Integrations
Subscriptions
Tenants
Users
Events
Get usage analytics
Retrieve comprehensive usage analytics with filtering, grouping, and time-series data
POST
/
events
/
analytics
curl --request POST \
--url https://api.cloud.flexprice.io/v1/events/analytics \
--header 'Content-Type: */*' \
--header 'x-api-key: <api-key>' \
--data '{
"end_time": "<string>",
"external_customer_id": "<string>",
"feature_ids": [
"<string>"
],
"group_by": [
"<string>"
],
"sources": [
"<string>"
],
"start_time": "<string>",
"window_size": "<string>"
}'
{
"currency": "<string>",
"items": [
{
"aggregation_type": "COUNT",
"currency": "<string>",
"event_name": "<string>",
"feature_id": "<string>",
"name": "<string>",
"points": [
{
"cost": 123,
"timestamp": "<string>",
"usage": 123
}
],
"source": "<string>",
"total_cost": 123,
"total_usage": 123,
"unit": "<string>",
"unit_plural": "<string>"
}
],
"total_cost": 123
}
Authorizations
Enter your API key in the format x-api-key <api-key>*
Body
*/*
Request body
The body is of type object
.
Response
200
application/json
OK
The response is of type object
.
curl --request POST \
--url https://api.cloud.flexprice.io/v1/events/analytics \
--header 'Content-Type: */*' \
--header 'x-api-key: <api-key>' \
--data '{
"end_time": "<string>",
"external_customer_id": "<string>",
"feature_ids": [
"<string>"
],
"group_by": [
"<string>"
],
"sources": [
"<string>"
],
"start_time": "<string>",
"window_size": "<string>"
}'
{
"currency": "<string>",
"items": [
{
"aggregation_type": "COUNT",
"currency": "<string>",
"event_name": "<string>",
"feature_id": "<string>",
"name": "<string>",
"points": [
{
"cost": 123,
"timestamp": "<string>",
"usage": 123
}
],
"source": "<string>",
"total_cost": 123,
"total_usage": 123,
"unit": "<string>",
"unit_plural": "<string>"
}
],
"total_cost": 123
}