Create a metric

Requires the api:write scope.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

A public metric asset. Every metric names its source in sourceId, except a calculated one: that omits sourceId, fieldId, timeZone and refreshStatus entirely (its dimensions also omit fieldId and dataType) and is written by sending a formula instead.

const
enum
Allowed:
string
length ≥ 1

The id of the source the metric reads from - a data feed, direct connection or cube, depending on sourceType. Required on every write except a calculated metric, which has no source.

string
string
string
required
string
string
string
enum
Allowed:
string
string
enum

The metric's source type. Internally this metric-creation path is named 'formula' (unrelated to the public formula field below, which is specific to calculated metrics) and is surfaced here as 'DATAFEED'; calculated metrics always report 'CALCULATED'.

Allowed:
boolean
boolean
string
string

Not a fixed set of values: 'OK' on success, otherwise an upper-cased free-text failure message (e.g. 'FAILED - PROFILE NOT FOUND: ...').

properties
object
dimensions
array of objects
dimensions
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json