0
votes

I am referring the document https://docs.microsoft.com/en-us/rest/api/azure/devops/git/annotated%20tags/get?view=azure-devops-rest-4.1 to get annotated Tags from the GIT repository using Azure DevOps Services REST APIs. But I am unable to find the "object Id" it is asking to put in API from Azure DevOps. When I am putting Sha code of the commit it is throwing an error as shown in image
enter image description here

1

1 Answers

1
votes

It is expecting the Object Id of the tag. If you want the ID, it is available if you find the tag using the refs api.

https://dev.azure.com/{organization}/_apis/git/repositories/{repositoryId}/refs?filter=tags/&api-version=5.0-preview.1

Note: If you use Repository name instead of Id, you'll have to also include the project.

Once you have the Id you want then use that to call the API you already are using.