List meters
⚠️ Preview: The Metering APIs are in preview and subject to change.
List meters.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
query Parameters
pagePage index.
Default is 1.
pageSizeThe maximum number of items per page.
Default is 100.
orderThe order direction.
The order direction.
orderByThe order by field.
Order by options for meters.
includeDeletedInclude deleted meters.
List meters › Responses
The request has succeeded.
id^[0-7][0-9A-HJKMNP-T… · requiredA unique identifier for the resource.
createdAtTimestamp of when the resource was created.
updatedAtTimestamp of when the resource was last updated.
slug^[a-z0-9]+(?:_[a-z0-… · requiredA unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
aggregationThe aggregation type to use for the meter.
eventTypeThe event type to aggregate.
descriptionOptional description of the resource. Maximum 1024 characters.
Set of key-value pairs. Metadata can be used to store additional information about a resource.
deletedAtTimestamp of when the resource was permanently deleted.
nameHuman-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
eventFromThe date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
valuePropertyJSONPath expression to extract the value from the ingested event's data property.
The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.
For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
Named JSONPath expressions to extract the group by values from the event data.
Keys must be unique and consist only alphanumeric and underscore characters.
Create meter
⚠️ Preview: The Metering APIs are in preview and subject to change.
Create a meter.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
Create meter › Request Body
slug^[a-z0-9]+(?:_[a-z0-… · requiredA unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
aggregationThe aggregation type to use for the meter.
eventTypeThe event type to aggregate.
descriptionOptional description of the resource. Maximum 1024 characters.
Set of key-value pairs. Metadata can be used to store additional information about a resource.
nameHuman-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
eventFromThe date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
valuePropertyJSONPath expression to extract the value from the ingested event's data property.
The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.
For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
Named JSONPath expressions to extract the group by values from the event data.
Keys must be unique and consist only alphanumeric and underscore characters.
Create meter › Responses
The request has succeeded and a new resource has been created as a result.
id^[0-7][0-9A-HJKMNP-T… · requiredA unique identifier for the resource.
createdAtTimestamp of when the resource was created.
updatedAtTimestamp of when the resource was last updated.
slug^[a-z0-9]+(?:_[a-z0-… · requiredA unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
aggregationThe aggregation type to use for the meter.
eventTypeThe event type to aggregate.
descriptionOptional description of the resource. Maximum 1024 characters.
Set of key-value pairs. Metadata can be used to store additional information about a resource.
deletedAtTimestamp of when the resource was permanently deleted.
nameHuman-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
eventFromThe date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
valuePropertyJSONPath expression to extract the value from the ingested event's data property.
The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.
For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
Named JSONPath expressions to extract the group by values from the event data.
Keys must be unique and consist only alphanumeric and underscore characters.
Get meter
⚠️ Preview: The Metering APIs are in preview and subject to change.
Get a meter by ID or slug.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
meterIdOrSlug^[a-z0-9]+(?:_[a-z0-… · requiredGet meter › Responses
The request has succeeded.
id^[0-7][0-9A-HJKMNP-T… · requiredA unique identifier for the resource.
createdAtTimestamp of when the resource was created.
updatedAtTimestamp of when the resource was last updated.
slug^[a-z0-9]+(?:_[a-z0-… · requiredA unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
aggregationThe aggregation type to use for the meter.
eventTypeThe event type to aggregate.
descriptionOptional description of the resource. Maximum 1024 characters.
Set of key-value pairs. Metadata can be used to store additional information about a resource.
deletedAtTimestamp of when the resource was permanently deleted.
nameHuman-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
eventFromThe date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
valuePropertyJSONPath expression to extract the value from the ingested event's data property.
The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.
For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
Named JSONPath expressions to extract the group by values from the event data.
Keys must be unique and consist only alphanumeric and underscore characters.
Update meter
⚠️ Preview: The Metering APIs are in preview and subject to change.
Update a meter.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
meterIdOrSlug^[a-z0-9]+(?:_[a-z0-… · requiredUpdate meter › Request Body
descriptionOptional description of the resource. Maximum 1024 characters.
Set of key-value pairs. Metadata can be used to store additional information about a resource.
nameHuman-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
Named JSONPath expressions to extract the group by values from the event data.
Keys must be unique and consist only alphanumeric and underscore characters.
Update meter › Responses
The request has succeeded.
id^[0-7][0-9A-HJKMNP-T… · requiredA unique identifier for the resource.
createdAtTimestamp of when the resource was created.
updatedAtTimestamp of when the resource was last updated.
slug^[a-z0-9]+(?:_[a-z0-… · requiredA unique, human-readable identifier for the meter. Must consist only alphanumeric and underscore characters.
aggregationThe aggregation type to use for the meter.
eventTypeThe event type to aggregate.
descriptionOptional description of the resource. Maximum 1024 characters.
Set of key-value pairs. Metadata can be used to store additional information about a resource.
deletedAtTimestamp of when the resource was permanently deleted.
nameHuman-readable name for the resource. Between 1 and 256 characters. Defaults to the slug if not specified.
eventFromThe date since the meter should include events. Useful to skip old events. If not specified, all historical events are included.
valuePropertyJSONPath expression to extract the value from the ingested event's data property.
The ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.
For UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored.
Named JSONPath expressions to extract the group by values from the event data.
Keys must be unique and consist only alphanumeric and underscore characters.
Delete meter
⚠️ Preview: The Metering APIs are in preview and subject to change.
Delete a meter.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
meterIdOrSlug^[a-z0-9]+(?:_[a-z0-… · requiredDelete meter › Responses
There is no content to send for this request, but the headers may be useful.
List meter group by values
⚠️ Preview: The Metering APIs are in preview and subject to change.
List meter group by values.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
meterIdOrSlug^[a-z0-9]+(?:_[a-z0-… · requiredgroupByKeyquery Parameters
fromStart date-time in RFC 3339 format.
Inclusive. Defaults to 24 hours ago.
For example: ?from=2025-01-01T00%3A00%3A00.000Z
toEnd date-time in RFC 3339 format.
Inclusive.
For example: ?to=2025-02-01T00%3A00%3A00.000Z
List meter group by values › Responses
The request has succeeded.
Query meter
⚠️ Preview: The Metering APIs are in preview and subject to change.
Query meter for usage.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
meterIdOrSlug^[a-z0-9]+(?:_[a-z0-… · requiredquery Parameters
clientIdClient ID Useful to track progress of a query.
fromStart date-time in RFC 3339 format.
Inclusive.
For example: ?from=2025-01-01T00%3A00%3A00.000Z
toEnd date-time in RFC 3339 format.
Inclusive.
For example: ?to=2025-02-01T00%3A00%3A00.000Z
windowSizeIf not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.
For example: ?windowSize=DAY
Aggregation window size.
windowTimeZoneThe value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). If not specified, the UTC timezone will be used.
For example: ?windowTimeZone=UTC
subjectFiltering by multiple subjects.
For example: ?subject=subject-1&subject=subject-2
filterCustomerIdFiltering by multiple customers.
For example: ?filterCustomerId=customer-1&filterCustomerId=customer-2
filterSubscriptionFiltering by multiple subscriptions.
For example: ?filterSubscription=subscription-1&filterSubscription=subscription-2
Simple filter for group bys with exact match.
For example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo
advancedMeterGroupByFiltersOptional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields.
groupByIf not specified a single aggregate will be returned for each subject and time window.
subject is a reserved group by value.
For example: ?groupBy=subject&groupBy=model
Query meter › Responses
The request has succeeded.
The usage data. If no data is available, an empty array is returned.
fromThe start of the period the usage is queried from. If not specified, the usage is queried from the beginning of time.
toThe end of the period the usage is queried to. If not specified, the usage is queried up to the current time.
windowSizeAggregation window size.
Query meter
⚠️ Preview: The Metering APIs are in preview and subject to change.
path Parameters
bucketIdThe id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.
meterIdOrSlug^[a-z0-9]+(?:_[a-z0-… · requiredQuery meter › Request Body
clientIdClient ID Useful to track progress of a query.
fromStart date-time in RFC 3339 format.
Inclusive.
toEnd date-time in RFC 3339 format.
Inclusive.
windowSizeAggregation window size.
windowTimeZoneThe value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). If not specified, the UTC timezone will be used.
subjectFiltering by multiple subjects.
filterCustomerIdFiltering by multiple customers.
filterSubscriptionFiltering by multiple subscriptions.
Simple filter for group bys with exact match.
Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields.
groupByIf not specified a single aggregate will be returned for each subject and time window.
subject is a reserved group by value.
Query meter › Responses
The request has succeeded.
The usage data. If no data is available, an empty array is returned.
fromThe start of the period the usage is queried from. If not specified, the usage is queried from the beginning of time.
toThe end of the period the usage is queried to. If not specified, the usage is queried up to the current time.
windowSizeAggregation window size.