Search code examples
azure-devops-rest-apigit-tag

commit id associated with git tag using Azure DevOps API


I have a git tag as input. I want commit id associated with that git tag as output.


Solution

  • Just add your tag name to the filter filter=tags/tagname

    full example:

    "https://dev.azure.com/$organization/$teamProject/_apis/git/repositories/$($repoName)/refs?filter=tags/$($tag)&api-version=6.0"