Create Meter
Intent
Creates a meter from the values supplied in the request.
When to call it
Call this when your application has collected the required values and is ready to create a meter.
Access boundary
Authorize the request with a token that carries meters:write.
Successful result
A successful request returns 201. The response schema below defines the body your integration receives.
Operational notes
Create a meter.
Scopes: meters:write
Authorizations
You can generate an Organization Access Token from your organization's settings.
Body
The name of the meter. Will be shown on customer's invoices and usage.
3The filter to apply on events that'll be used to calculate the meter.
The aggregation to apply on the filtered events to calculate the meter.
- CountAggregation
- PropertyAggregation
- UniqueAggregation
Key-value object allowing you to store additional information.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
The unit of the meter.
scalar, token, custom The label for the custom unit, e.g. 'request'. Required when unit is 'custom'.
The multiplier to convert from the base unit to display scale, e.g. 1000 to display per 1000 units. Defaults to 1 when not provided.
x > 0The organization ID.
"1dbfc517-0bbf-4301-9ba8-555ca42b9737"
Response
Meter created.
The time Ruba created this record.
The time this record last changed.
The stable identifier for this record.
The name of the meter. Will be shown on customer's invoices and usage.
The unit of the meter.
scalar, token, custom The filter to apply on events that'll be used to calculate the meter.
The aggregation to apply on the filtered events to calculate the meter.
- CountAggregation
- PropertyAggregation
- UniqueAggregation
The ID of the organization owning the meter.
The label for the custom unit.
The multiplier to convert from base unit to display scale.
Whether the meter is archived and the time it was archived.