curl --request GET \
--url https://dev.seqhq.io/api/usage-metrics/{usageMetricId}/calculate \
--header 'Authorization: <authorization>'{
"name": "total_messages_sent",
"metricType": "GROUPED",
"eventType": "message_sent",
"aggregationType": "SUM",
"eventCount": 5,
"value": 150.035,
"unit": "bytes",
"minEventId": "0183d0f1-6b5a-74d4-9129-1f4b90191666",
"maxEventId": "0183ea03-aca0-7019-b80d-6aacce344e92"
}Calculate usage metric for customer and timeframe
curl --request GET \
--url https://dev.seqhq.io/api/usage-metrics/{usageMetricId}/calculate \
--header 'Authorization: <authorization>'{
"name": "total_messages_sent",
"metricType": "GROUPED",
"eventType": "message_sent",
"aggregationType": "SUM",
"eventCount": 5,
"value": 150.035,
"unit": "bytes",
"minEventId": "0183d0f1-6b5a-74d4-9129-1f4b90191666",
"maxEventId": "0183ea03-aca0-7019-b80d-6aacce344e92"
}Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
2024-07-30 Usage Metric ID
Customer Aliases / internal IDs
Billing period start
Billing period end (inclusive)
Custom parameter values
OK
"total_messages_sent"
SIMPLE, GROUPED "GROUPED"
"message_sent"
COUNT, UNIQUE, SUM, CUSTOM "COUNT"
5
150.035
"bytes"
"0183d0f1-6b5a-74d4-9129-1f4b90191666"
"0183ea03-aca0-7019-b80d-6aacce344e92"