Gets the tag object of an annotated tag (not lightweight tags)
GET
/repos/{owner}/{repo}/git/tags/{sha}
const url = 'https://gitea.example.com/api/v1/repos/example/example/git/tags/example';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://gitea.example.com/api/v1/repos/example/example/git/tags/example \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”owner
required
string
Owner of the repo
repo
required
string
Name of the repo
sha
required
string
Sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.
Responses
Section titled “Responses”AnnotatedTag
Media typeapplication/json
AnnotatedTag represents an annotated tag
object
message
string
object
AnnotatedTagObject contains meta information of the tag object
object
sha
string
type
string
url
string
sha
string
tag
string
tagger
CommitUser contains information of a user in the context of a commit.
object
date
string
email
string format: email
name
string
url
string
verification
PayloadCommitVerification represents the GPG verification of a commit
object
payload
string
reason
string
signature
string
signer
PayloadUser represents the author or committer of a commit
object
email
string format: email
name
Full name of the commit author
string
username
string
verified
boolean
Examplegenerated
{ "message": "example", "object": { "sha": "example", "type": "example", "url": "example" }, "sha": "example", "tag": "example", "tagger": { "date": "example", "email": "hello@example.com", "name": "example" }, "url": "example", "verification": { "payload": "example", "reason": "example", "signature": "example", "signer": { "email": "hello@example.com", "name": "example", "username": "example" }, "verified": true }}APIError is error format response
Media typeapplication/json
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response
Media typeapplication/json