v1
latestSwagger 2.02026-07-175658186.8 KBCreate 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*
Additional attributes can be optionally requested in the 'expansion' field as described in the GET calculated metrics section.
Path parameters
The Global Company ID for the Adobe Analytics organization
Query parameters
Locale
Comma-delimited list of additional calculated metric metadata fields to include on response.
Headers
The access token copied from your AA API client integration, prefixed with "Bearer ".
The API key copied from your AA API client integration. For more information on how to obtain this value, see Getting started with the Analytics API.
Request body
Response
successful operation