Reputation: 89
Thanks for your attention.I am a new Azure Devops API user.
Now,I want to filter some repo url with a same tag.
According the api rule base on: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/annotated-tags/get?view=azure-devops-rest-7.0&tabs=HTTP
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags/{objectId}?api-version=7.0
I can get {organization},{project},{repositoryId}, but I haven't find the API to get the tag's id:{objectId}.
objectId path True string ObjectId (Sha1Id) of tag to get.
Then I want to create a new tag with the output result to get the tag id for a workaround,base on: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/annotated-tags/create?view=azure-devops-rest-7.0&tabs=HTTP
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags?api-version=7.0
However,there is no parameter to define the tag name.
Question: Is there any way to get the ADO repo's tag id with command if i have the tag name?
OR: Is there any way to filter all repo URL with the same tag name via command?
Thanks for your patience and help.
Upvotes: 1
Views: 701
Reputation: 4125
Question: Is there any way to get the ADO repo's tag id with command if i have the tag name?
You can use Refs – List to get tag objectid.
Find the tag here:
Upvotes: 1