Attribution Metric Breakdown
API Description
Use this API to break down a metric and automatically generate a metric tree structure. Metric breakdown is commonly used for subsequent metric tree attribution.
API URL
Common Request Headers
| parameter | Type | required | Description |
|---|---|---|---|
| tenant-id | String | Yes | Tenant space identifier |
| auth-type | String | Yes | Authentication method. Supports UID, TOKEN, ACCOUNT, and APIKEY. |
| auth-value | String | Yes | Authentication value corresponding to auth-type. |
How to Obtain Common parameters
In Aloudata CAN, select Metric Applications in the top navigation bar, then select API Integration in the left navigation menu. You can obtain tenant-id on the API Integration page. Set auth-value according to auth-type.

Request parameters
| Field | Type | required | Description |
|---|---|---|---|
| metric | String | Yes | Name of the metric to break down |
Request Example
Response parameters
| Field Name | Description |
|---|---|
| rootNode | ID of the metric tree root node |
| metricTree | Metric tree structure. The value is the breakdown expression that references node IDs |
| metricTreeNodes | The key is the node ID, and the value is a metric code or temporary metric ID |
| metricDefinitions | Temporary metric definitions |
Response Example
{
"rootNode": "node_001",
"metricTree": {
"node_001": "[node_002] - [node_003]",
"node_002": "[node_004] * [node_005]"
},
"metricTreeNodes":{
"node_001":"profit_zj",
"node_002":"order_amt",
"node_003":"cost",
"node_004":"orde_count_zj",
"node_005":"unit_price"
},
"metricDefinitions": {
"profit_zj": {
"refMetric": "profit",
"filters": ["[province]=\"Zhejiang\""]
}
}
}
Usage Notes
-
The response contains the complete metric tree for subsequent tree attribution calculation.
-
metricTreeNodesdetermines which metric corresponds to each node. -
Expressions reference node IDs, for example
[node_004] * [node_005].