Create metric
This endpoint is used to create a metric using a SQL string. See SQL support for a description of constructing SQL queries with examples.
Authorizations
API Keys can be issued in the Orb's web application.
Body
A sql string defining the metric.
The name of the metric.
The id of the item
A description of the metric.
User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null
, and the entire metadata mapping can be cleared by setting metadata
to null
.
Response
The Metric resource represents a calculation of a quantity based on events. Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.
User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to null
, and the entire metadata mapping can be cleared by setting metadata
to null
.
active
, draft
, archived
The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics, and prices and are used for defining external sync behavior for invoices and tax calculation purposes.
Was this page helpful?