Suger

create billable metric

POST https://api.suger.cloud/org/{orgId}/billableMetric

Create a new billable metric for the given organization.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID

Request Body

Required. Content-Type: application/json · Schema: BillableMetric

BillableMetric fields:

FieldTypeRequiredDescription
aggregationType BillableMetricAggregationType no
creationTime string no
description string no
id string no
info BillableMetricInfo no
lastUpdateTime string no
name string no
organizationId string no
status BillableMetricStatus no

BillableMetricInfo fields:

FieldTypeRequiredDescription
filterGroups array<BillableMetricFilterGroup> no FilterGroups is a list of filter groups. The filterGroups are connected by AND.
groupBys array<string> no GroupBys is a list of fields to group by.
propertyUniqueOn string no The target property for unique count aggregate.

BillableMetricFilterGroup fields:

FieldTypeRequiredDescription
filters array<BillableMetricFilter> no

BillableMetricFilter fields:

FieldTypeRequiredDescription
name string no
operation BillableMetricFilterOperation no
value object no The value of the filter. The type of the value depends on the valueType.
valueType BillableMetricFilterValueType no

Responses

200 — OK

Content-Type: application/json · Schema: BillableMetric

BillableMetric fields:

FieldTypeRequiredDescription
aggregationType BillableMetricAggregationType no
creationTime string no
description string no
id string no
info BillableMetricInfo no
lastUpdateTime string no
name string no
organizationId string no
status BillableMetricStatus no

BillableMetricInfo fields:

FieldTypeRequiredDescription
filterGroups array<BillableMetricFilterGroup> no FilterGroups is a list of filter groups. The filterGroups are connected by AND.
groupBys array<string> no GroupBys is a list of fields to group by.
propertyUniqueOn string no The target property for unique count aggregate.

BillableMetricFilterGroup fields:

FieldTypeRequiredDescription
filters array<BillableMetricFilter> no

BillableMetricFilter fields:

FieldTypeRequiredDescription
name string no
operation BillableMetricFilterOperation no
value object no The value of the filter. The type of the value depends on the valueType.
valueType BillableMetricFilterValueType no

400 — Bad request params

Content-Type: application/json

500 — Internal server error

Content-Type: application/json


View as Markdown · Interactive API reference

Spotted something wrong or out of date on this page? Tell us and we'll correct it.