code 更新指标定义,只允许更新 name、description、unit、prompt、syno。yiask_property 中查找同 code 记录;如果命中,则只更新 yiask_property, 不再查询 yiask_custom_metric。只有当 yiask_property 未命中时,才会回退查询并更新 yiask_custom_metric。Authorization: Bearer ********************{
"name": "GMV",
"description": "成交金额",
"unit": "元",
"prompt": "用于分析成交额",
"syno": [
"销售额",
"成交额"
]
}curl --location '/metric:update?code=undefined&filterByTk=undefined' \
--header 'X-SPACES: default' \
--header 'X-SPACES: {{space}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "GMV",
"description": "成交金额",
"unit": "元",
"prompt": "用于分析成交额",
"syno": [
"销售额",
"成交额"
]
}'{
"success": true,
"code": "gmv",
"updated": {
"yiask_property": 2,
"yiask_custom_metric": 0
},
"values": {
"name": "GMV",
"description": "成交金额",
"unit": "元",
"prompt": "用于分析成交额",
"syno": [
"销售额",
"成交额"
]
}
}