Skip to main content
POST
Create a billable metric

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
aggregation_type
enum<string>
required
Available options:
COUNT,
LATEST,
MAX,
MIN,
MEAN,
SUM,
COUNT_DISTINCT
code
string
required
name
string
required
product_family_id
string<MeteroidId>
required
Example:

"pf_7n42DGM5Tflk9n8mt7Fhc7"

aggregation_key
string | null
description
string | null
filters
object[] | null

Pre-aggregation property filters. Optional and backward-compatible; omit for none.

product_id
string<MeteroidId> | null
Example:

"prd_7n42DGM5Tflk9n8mt7Fhc7"

segmentation_matrix
object
unit_conversion
object | null
usage_group_key
string | null

Response

Metric created

aggregation_type
enum<string>
required
Available options:
COUNT,
LATEST,
MAX,
MIN,
MEAN,
SUM,
COUNT_DISTINCT
code
string
required
created_at
string<date-time>
required
id
string<MeteroidId>
required
Example:

"bm_7n42DGM5Tflk9n8mt7Fhc7"

name
string
required
product_family_id
string<MeteroidId>
required
Example:

"pf_7n42DGM5Tflk9n8mt7Fhc7"

aggregation_key
string | null
archived_at
string<date-time> | null
description
string | null
filters
object[]
product_id
string<MeteroidId> | null
Example:

"prd_7n42DGM5Tflk9n8mt7Fhc7"

segmentation_matrix
object
unit_conversion
object | null
usage_group_key
string | null