Share via


Templates - Get

Gets the template with specified id

GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates/{templateId}?api-version=7.1

URI Parameters

Name In Required Type Description
organization
path True

string

The name of the Azure DevOps organization.

project
path True

string

Project ID or project name

team
path True

string

Team ID or team name

templateId
path True

string (uuid)

Template Id

api-version
query True

string

Version of the API to use. This should be set to '7.1' to use this version of the api.

Responses

Name Type Description
200 OK

WorkItemTemplate

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.work Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks.

Examples

Gets the template with specified id

Sample request

GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates/{templateId}?api-version=7.1

Sample response

{
  "fields": {
    "System.WorkItemType": "Bug",
    "System.AreaPath": "Test Project",
    "System.TeamProject": "Test Project",
    "System.IterationPath": "Test Project",
    "System.State": "New",
    "System.Reason": "New",
    "Microsoft.VSTS.Common.StateChangeDate": "1753-01-01T00:00:00Z",
    "System.ChangedBy": {
      "displayName": "fabrikamm",
      "url": "https://app.vssps.visualstudio.com/A50ff3dc4-ccd4-4367-8c9b-9d2b9c5dd6ef/_apis/Identities/b77b7c0f-55da-690a-96f7-83d21872dfbf",
      "_links": {
        "avatar": {
          "href": "https://dev.azure.com/fabrikamm0652/_apis/GraphProfile/MemberAvatars/msa.Yjc3YjdjMGYtNTVkYS03OTBhLTk2ZjctODNkMjE4NzJkZmJm"
        }
      },
      "id": "b77b7c0f-55da-690a-96f7-83d21872dfbf",
      "uniqueName": "fabrikamm@outlook.com",
      "imageUrl": "https://dev.azure.com/fabrikamm0652/_api/_common/identityImage?id=b77b7c0f-55da-690a-96f7-83d21872dfbf",
      "descriptor": "msa.Yjc3YjdjMGYtNTVkYS03OTBhLTk2ZjctODNkMjE4NzJkZmJm"
    },
    "System.CreatedBy": {
      "displayName": "fabrikamm",
      "url": "https://app.vssps.visualstudio.com/A50ff3dc4-ccd4-4367-8c9b-9d2b9c5dd6ef/_apis/Identities/b77b7c0f-55da-690a-96f7-83d21872dfbf",
      "_links": {
        "avatar": {
          "href": "https://dev.azure.com/fabrikamm0652/_apis/GraphProfile/MemberAvatars/msa.Yjc3YjdjMGYtNTVkYS03OTBhLTk2ZjctODNkMjE4NzJkZmJm"
        }
      },
      "id": "b77b7c0f-55da-690a-96f7-83d21872dfbf",
      "uniqueName": "fabrikamm@outlook.com",
      "imageUrl": "https://dev.azure.com/fabrikamm0652/_api/_common/identityImage?id=b77b7c0f-55da-690a-96f7-83d21872dfbf",
      "descriptor": "msa.Yjc3YjdjMGYtNTVkYS03OTBhLTk2ZjctODNkMjE4NzJkZmJm"
    },
    "Microsoft.VSTS.Common.Priority": 2,
    "Microsoft.VSTS.Common.Severity": "3 - Medium",
    "Microsoft.VSTS.Common.ValueArea": "Business"
  },
  "_links": {
    "workItemType": {
      "href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Bug"
    },
    "fields": {
      "href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/fields"
    }
  },
  "url": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItems"
}

Definitions

Name Description
ReferenceLinks

The class to represent a collection of REST reference links.

WorkItemTemplate

Describes a work item template.

The class to represent a collection of REST reference links.

Name Type Description
links

object

The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only.

WorkItemTemplate

Describes a work item template.

Name Type Description
_links

ReferenceLinks

Link references to related REST resources.

description

string

The description of the work item template.

fields

object

Mapping of field and its templated value.

id

string (uuid)

The identifier of the work item template.

name

string

The name of the work item template.

url

string

workItemTypeName

string

The name of the work item type.