Azure devops 如何在VSTSAPI中删除带注释的标记(git标记)?
我能够使用下面的请求成功地创建一个带注释的标记(git标记),但是我不能以编程方式删除它Azure devops 如何在VSTSAPI中删除带注释的标记(git标记)?,azure-devops,azure-devops-rest-api,Azure Devops,Azure Devops Rest Api,我能够使用下面的请求成功地创建一个带注释的标记(git标记),但是我不能以编程方式删除它 POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags?api-version=4.1-preview.1 请求: 根据报告,没有删除端点,因此我尝试了删除端点,但到目前为止运气不佳。它只返回400(无效请求) 答复: 谢谢。我能想出我自己的问题。删除
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags?api-version=4.1-preview.1
请求:
根据报告,没有删除端点,因此我尝试了删除端点,但到目前为止运气不佳。它只返回400(无效请求)
答复:
谢谢。我能想出我自己的问题。删除带注释的标记的方法是使用Refs API对其进行更新。但这并没有很好的文档记录
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=4.1
请求:
Azure DevOps文档:
创建、更新或删除引用(分支)
DELETE https://dev.azure.com/{organization}/{project}/_apis/git/favorites/refs/{favoriteId}?api-version=4.1-preview.1
{
"count": 1,
"value": {
"Message": "The request is invalid."
}
}
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=4.1
[
{
"name": "refs/tags/wagner-test-3",
"newObjectId": "0000000000000000000000000000000000000000",
"oldObjectId": "aaaaab6cad84a07b7bd65cf3519142a12f856baa"
}
]