【发布时间】:2018-03-16 19:34:45
【问题描述】:
因此,我创建了一个名为“test_count”的自定义指标,并将其作为自定义指标添加到项目中。我可以用 REST 查询度量
GET /api/custom_measures/search
给定 projectKey 作为参数和 f=metric,我得到
{
"customMeasures": [
{
"id": "1",
"metric": {
"id": "145",
"key": "test_count",
"type": "INT",
"name": "Test Count",
"domain": "Coverage"
}
}
],
"total": 1,
"p": 1,
"ps": 100
}
到目前为止一切顺利。请注意,在此之前我已通过/api/authentication 授权自己。
现在我想更新这个自定义度量。我发布到以下
POST /api/custom_measures/update
给定 id 和 value 作为参数。但我得到 401。我尝试使用 id 1 和 145,但都返回 401。不用说,测量没有通过。
我做错了什么?
【问题讨论】:
标签: sonarqube