Meter API parameters and inherited properties

Meter API parameters and inherited properties

Cloud_Edition_button.webp

This page lists the required and optional parameters for defining a meter using the API, and explains which properties are inherited from the associated meter type at creation. For detailed instructions on how to create meters, see API reference.

Note!
A meter can be created at any time using the API once the meter type and a stream with a Meter processor have been created.

Mandatory and optional parameters on a meter

When creating a meter, there are both required and optional parameters. All fields can be updated or removed as needed. Once added, customFields are included in the meter output and can be extracted for use in external systems such as billing platforms.

Parameter

Description

Required/Optional

Parameter

Description

Required/Optional

meterKey

Identifies the meter processor, which organizes the usage data.

Required

meterTypeID

Specifies the type of meter that will aggregate usage.

Required

userID

Uniquely identifies the customer.

Required

customFields

These are properties associated with the entity you are metering you are metering. For example, if metering printers, custom fields could include the printer’s brand or the building in which the printer is installed.

Optional

Inherited properties from the meter type

When a meter is created, it inherits the following properties from the specified meter type:

Property

Note

Property

Note

activeFrom

The meter is active from the date and time defined in the Active from field in the meter type.

  • If activeFrom is set to a time before the meter creation time, the meter will be activated as soon as it is created.

  • The time is based on the timezone defined in the meter type at the time of its creation.

activeTo

The meter is active until the date and time defined in the Active to field in the meter type.

  • The time is calculated using the timezone defined in the meter type.

unit

Defines the unit in which the metered record value will be counted, such as minutes, days, or pages.

aggregationType

The meter’s usage is aggregated according to the type of aggregation defined in the meter type.

capacity

Sets the maximum usage value for the meter, as defined in the meter type.
This value is a reference for thresholds and may be used to trigger actions or notifications when usage approaches or exceeds capacity.

thresholds

The meter inherits all thresholds defined in the meter type at the time of its creation.
Thresholds determine when specific actions or notifications are triggered based on usage.

resetSchedule

The meter follows the reset schedule defined in the meter type.

  • The period end is calculated based on this schedule.

  • The timezone defined in the meter type is considered when calculating both the period start and period end.

  • The period start is set to the time of meter creation in the selected timezone and is shown in the Period start field in theMeter processor inspect tab. For details, see Flushing metered records.