因此,我创建了一个名为“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.不用说,测量没有通过。
我做错了什么?
答案 0 :(得分:0)
您需要使用 POST发送您的凭据。