curl --request PUT \
--url https://api.hyperline.co/v1/aggregators/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "api_calls",
"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,
"id": "<string>",
"name": "<string>",
"comparison_operator": "gte"
}
],
"operation": "count",
"property": "<string>"
}
'{
"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"
}Update the details of an existing aggregator.
curl --request PUT \
--url https://api.hyperline.co/v1/aggregators/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"entity": "api_calls",
"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,
"id": "<string>",
"name": "<string>",
"comparison_operator": "gte"
}
],
"operation": "count",
"property": "<string>"
}
'{
"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.
The billable event entity to aggregate.
"api_calls"
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. Replaces existing thresholds.
Show child attributes
The aggregation operation to perform.
count, sum The property to sum. Required when operation is 'sum'.
count, sum Show child attributes
metered, licensed days, weeks, months, years Show child attributes
Was this page helpful?