Skip to navigation

create_meter_setup

Shortcut: meter, meter value, and calculation in one call

Live server: test server (test.mcp.solvimon.com) only.

Creates a meter, a meter value, and a meter value calculation in one call, or adds a value and calculation to an existing meter. Returns the mvc_... id to set as meter_value_calculation_id on a USAGE_BASED product item. If a step fails, the earlier steps are undone.

ParameterRequiredDescription
meter_name, meter_referenceYes, unless meter_idDisplay name and unique reference of a new meter
meter_idNoAdd to this existing meter instead
value_name, value_referenceYes, unless meter_value_idDisplay name and unique reference of a new meter value
meter_value_idNoUse this existing ACTIVE meter value instead
value_requiredNoMake a value added to an existing meter required. Default false
calculation_typeNoAggregation method: SUM (default), MAX, MIN, AVERAGE, or UNIQUE
calculation_name, calculation_referenceNoGenerated when left out
value_typeNoData type of the meter value. Default NUMBER.
persistNoWhether to persist the calculation output. Default false.
Create a meter setup
{
"meter_name": "API requests",
"meter_reference": "api-requests",
"value_name": "count",
"value_reference": "api-requests-count",
"calculation_type": "SUM"
}