Annotated Tags - Get

Get an annotated tag.

Repositories have both a name and an identifier. Identifiers are globally unique, but several projects may contain a repository of the same name. You don't need to include the project if you specify a repository by ID. However, if you specify a repository by name, you must also specify the project (by name or ID).

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/annotatedtags/{objectId}?api-version=6.0-preview.1

URI Parameters

Name In Required Type Description
objectId
path True

string

ObjectId (Sha1Id) of tag to get.

organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

repositoryId
path True

string

ID or name of the repository.

api-version
query True

string

Version of the API to use. This should be set to '6.0-preview.1' to use this version of the api.

Responses

Name Type Description
200 OK

GitAnnotatedTag

successful operation

Security

oauth2

Type: oauth2
Flow: accessCode
Authorization URL: https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL: https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer

Scopes

Name Description
vso.code Grants the ability to read source code and metadata about commits, changesets, branches, and other version control artifacts. Also grants the ability to search code and get notified about version control events via service hooks.

Examples

Sample Request

GET https://dev.azure.com/fabrikam/c34d5807-1734-4541-ad1c-d16e9ac1faca/_apis/git/repositories/{repositoryId}/annotatedtags/{objectId}?api-version=6.0-preview.1

Sample Response

{
  "name": "refs/tags/v0.1-beta2",
  "objectId": "69080710948ac8ba63e44eca2daf0b30f38c428d",
  "taggedObject": {
    "objectId": "c60be62ebf0e86b5aa01dbb98657b4b7e5905234",
    "objectType": "commit"
  },
  "taggedBy": {
    "name": "Norman Paulk",
    "email": "Fabrikamfiber16@hotmail.com",
    "date": "2017-06-22T04:28:23"
  },
  "message": "First beta release",
  "url": "https://dev.azure.com/fabrikam/c34d5807-1734-4541-ad1c-d16e9ac1faca/_apis/git/repositories/ca93c3a5-87bb-4b5b-a62f-1f971d677c79/annotatedTags/69080710948ac8ba63e44eca2daf0b30f38c428d"
}

Definitions

Name Description
GitAnnotatedTag

A Git annotated tag.

GitObject

Git object identifier and type information.

GitObjectType

Type of object (Commit, Tree, Blob, Tag)

GitUserDate

User info and date for Git operations.

GitAnnotatedTag

A Git annotated tag.

Name Type Description
message

string

The tagging Message

name

string

The name of the annotated tag.

objectId

string

The objectId (Sha1Id) of the tag.

taggedBy

GitUserDate

User info and date of tagging.

taggedObject

GitObject

Tagged git object.

url

string

GitObject

Git object identifier and type information.

Name Type Description
objectId

string

Object Id (Sha1Id).

objectType

GitObjectType

Type of object (Commit, Tree, Blob, Tag)

GitObjectType

Type of object (Commit, Tree, Blob, Tag)

Name Type Description
bad

string

blob

string

commit

string

ext2

string

ofsDelta

string

refDelta

string

tag

string

tree

string

GitUserDate

User info and date for Git operations.

Name Type Description
date

string

Date of the Git operation.

email

string

Email address of the user performing the Git operation.

imageUrl

string

Url for the user's avatar.

name

string

Name of the user performing the Git operation.