Validate calculated metrics
data-variant=info
data-slots=text
Adobe may add optional request and response members (name/value pairs) to existing API objects at any time and without notice or changes in versioning. Adobe recommends that you refer to the API documentation of any third-party tool you integrate with our APIs so that such additions are ignored in processing if not understood. If implemented properly, such additions are non-breaking changes for your implementation. Adobe will not remove parameters or add required parameters without first providing standard notification through release notes.
Data views have different dimensions and metrics available. A calculated metric that's valid in one data view might not be valid in another. You can use the calculatedmetrics/validate endpoint to check and see if a given calculated metric is valid.
POST https://cja.adobe.io/calculatedmetrics/validate
An example POST body:
{
"name": "Integration Test 1",
"description": "Integration Test 1 Description",
"dataId": "{DATAID}",
"type": "percent",
"definition": {
"func": "calc-metric",
"formula": {
"func": "divide",
"col1": {
"func": "metric",
"name": "metrics\/visits"
},
"col2": {
"func": "metric",
"name": "metrics\/visitors"
}
},
"version": [
1,
0,
0
]
}
}
An example response:
{
"valid": true,
"identityMetrics": [ { "identity": "metrics/visits" }, { "identity": "metrics/visitors" } ],
"functions": [ "divide" ],
"validator_version": "1.0.0",
"supported_products": [ "oberon", "frag" ],
"supported_schema": [ "schema_oberon", "schema_frag" ]
}