Sample - GitHub REST API
GET/repos/{owner}/{repo}/git/tags/{tag_sha}

Get a Git tag

Retrieves metadata for a Git tag identified by its object SHA. Supply owner, repo, and tag_sha to locate the tag in the repository. The response includes tagger and referenced-object metadata together with signature verification details and the verification reason.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
tag_shastringrequired
The SHA identifying the Git tag to retrieve.

3 status codes
200Returns the Git tag object with its SHA, tag name, message, URL, tagger details, referenced object, and signature `verification` details.
node_idstringrequired
tagstringrequired
Name of the tag
shastringrequired
urlstringrequired
URL for the tag
messagestringrequired
Message describing the purpose of the tag
taggerobjectrequired
objectobjectrequired
verificationobjectoptional
404Returned when the repository or tag identified by `tag_sha` cannot be found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
409Returned when the request encounters a conflict.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned when the repository or tag identified by tag_sha cannot be found. A 409 is returned when the request encounters a conflict. Use the verification object to inspect whether the tag's signature was verified and why.