Edit in GitHubLog an issue

Validate calculated metrics

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:

Copied to your clipboard
{
"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:

Copied to your clipboard
{
"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" ]
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.