curl --request POST \
--url https://api.hyperline.co/v1/aggregators \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "api_calls",
"operation": "count",
"type": "metered",
"where": {
"conditional": "and",
"fields": [
{
"property": "<string>",
"operator": "isNull"
}
]
},
"name": "<string>",
"description": "<string>",
"allow_negative_values": false,
"aggregate_on_customers_enabled": false,
"custom_event_name": "<string>",
"exposed_event_keys": [
"<string>"
],
"default_interval_count": 123,
"default_interval_period": "days",
"thresholds": [
{
"threshold_value": 123,
"name": "<string>",
"comparison_operator": "gte"
}
]
}
'{
"id": "<string>",
"entity": "<string>",
"operation": "count",
"property": "<string>",
"where": {
"conditional": "and",
"fields": [
{
"property": "<string>",
"operator": "isNull"
}
]
},
"type": "metered",
"name": "<string>",
"description": "<string>",
"allow_negative_values": true,
"aggregate_on_customers_enabled": true,
"default_interval_count": 123,
"default_interval_period": "days",
"custom_event_name": "<string>",
"exposed_event_keys": [
"<string>"
],
"thresholds": [
{
"id": "<string>",
"name": "<string>",
"threshold_value": 123,
"comparison_operator": "gte"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}Create a new aggregator.
curl --request POST \
--url https://api.hyperline.co/v1/aggregators \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "api_calls",
"operation": "count",
"type": "metered",
"where": {
"conditional": "and",
"fields": [
{
"property": "<string>",
"operator": "isNull"
}
]
},
"name": "<string>",
"description": "<string>",
"allow_negative_values": false,
"aggregate_on_customers_enabled": false,
"custom_event_name": "<string>",
"exposed_event_keys": [
"<string>"
],
"default_interval_count": 123,
"default_interval_period": "days",
"thresholds": [
{
"threshold_value": 123,
"name": "<string>",
"comparison_operator": "gte"
}
]
}
'{
"id": "<string>",
"entity": "<string>",
"operation": "count",
"property": "<string>",
"where": {
"conditional": "and",
"fields": [
{
"property": "<string>",
"operator": "isNull"
}
]
},
"type": "metered",
"name": "<string>",
"description": "<string>",
"allow_negative_values": true,
"aggregate_on_customers_enabled": true,
"default_interval_count": 123,
"default_interval_period": "days",
"custom_event_name": "<string>",
"exposed_event_keys": [
"<string>"
],
"thresholds": [
{
"id": "<string>",
"name": "<string>",
"threshold_value": 123,
"comparison_operator": "gte"
}
],
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Create aggregator payload
Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.
The billable event entity to aggregate.
"api_calls"
The aggregation operation to perform.
count The type of aggregator.
metered, licensed Filter conditions for the aggregation.
Show child attributes
Name of the aggregator.
Description of the aggregator.
Whether the aggregator can produce negative values.
Whether the aggregator should aggregate on customers.
Custom event name for the aggregator.
Event keys exposed by the aggregator.
Default interval count for usage periods.
Default interval period for usage periods.
days, weeks, months, years Thresholds for the aggregator.
Show child attributes
The newly created aggregator
count, sum Show child attributes
metered, licensed days, weeks, months, years Show child attributes
Was this page helpful?