🚀 Overview

Billing meters represent usage metrics (e.g., API calls, storage use, transaction value) that your applications track and bill for. Each meter defines:

Aggregation Types Define How Consumption Is Measured

Below is the complete list of aggregation types officially supported by XStak.

Aggregation Type Description Transcription
SUM Sum a defined property for incoming events SUM(events.payload.value)
COUNT Count the number of times an incoming event occurs COUNT(events)
LATEST Get the latest value of a defined property for incoming events LAST_VALUE(events) OVER ([PARTITION BY events.timestamp])
MAX Get the maximum value of a defined property for incoming events MAX(events.payload.value)

While COUNT tallies the number of times an event occurs, all other types aggregate over a single property of the event. The result of this aggregation directly determines how your customers are charged.

This resource lets you create, update, get or toggle meters via REST endpoints.


🛠 Base URL

{{base_url}}/public/v1/meter

⚙️ Endpoints


1. Create a Billing Meter