calculatedmetrics
Create a new Calculated Metric
Creates a new calculated metric. The following attributes are available when creating a calculated metric:
IMPORTANT: Required Fields: name, definition, rsid
Optional fields: description
Example definition for use in testing API below ("Visits per visitor"):
"definition": {
"formula": {
"func": "divide",
"col1": {
"func": "metric",
"name": "metrics/visits",
"description": "Visits"
},
"col2": {
"func": "metric",
"name": "metrics/visitors",
"description": "Unique Visitors"
}
},
"func": "calc-metric",
"version": [
1,
0,
0
]
}
A calculated metric response will always include these default items:* id, name, description, rsid, owner*
Other attributes can be optionally requested through the 'expansion' field as defined/documented in the GET endpoints (see GET "/calculatedmetrics" or GET "/calculatedmetrics/{id}" for more documentation).
post/calculatedmetrics
Query parameters
localestring
Locale
expansionstring[]
Comma-delimited list of additional calculated metric metadata fields to include on response.
Request body
Response
successful operation