Templates - List
Gets template
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?api-version=7.1
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?workitemtypename={workitemtypename}&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 |
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. |
workitemtypename
|
query |
string |
Optional, When specified returns templates for given Work item type. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
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 templates
Sample request
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?api-version=7.1
Sample response
{
"count": 9,
"value": [
{
"id": "5dbed2c3-1534-4894-aff4-0234fa3ae56d",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/5dbed2c3-1534-4894-aff4-0234fa3ae56d"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/5dbed2c3-1534-4894-aff4-0234fa3ae56d"
},
{
"id": "2564ee23-9824-4cde-a42d-3036adaf50e7",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/2564ee23-9824-4cde-a42d-3036adaf50e7"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/2564ee23-9824-4cde-a42d-3036adaf50e7"
},
{
"id": "05132b3a-41d6-430f-8738-42b20b34a601",
"name": "Test Template",
"description": "Template to be created",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/05132b3a-41d6-430f-8738-42b20b34a601"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/05132b3a-41d6-430f-8738-42b20b34a601"
},
{
"id": "40ca92a6-0e32-4b44-8e57-664127faa0be",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/40ca92a6-0e32-4b44-8e57-664127faa0be"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/40ca92a6-0e32-4b44-8e57-664127faa0be"
},
{
"id": "9363ac38-9e16-44b2-8a76-76480f366e2f",
"name": "Test Template",
"description": "Template to be created",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/9363ac38-9e16-44b2-8a76-76480f366e2f"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/9363ac38-9e16-44b2-8a76-76480f366e2f"
},
{
"id": "2e703f7c-b028-4bf3-883d-7e641758a1f2",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/2e703f7c-b028-4bf3-883d-7e641758a1f2"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/2e703f7c-b028-4bf3-883d-7e641758a1f2"
},
{
"id": "72608fee-226d-4c34-821a-82edeef99dbf",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/72608fee-226d-4c34-821a-82edeef99dbf"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/72608fee-226d-4c34-821a-82edeef99dbf"
},
{
"id": "88c9ab05-74cc-45ff-a39d-a4400ff70796",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/88c9ab05-74cc-45ff-a39d-a4400ff70796"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/88c9ab05-74cc-45ff-a39d-a4400ff70796"
},
{
"id": "d1e32bd5-98f6-4ad6-b035-e131aa1b4cdb",
"name": "Test Template",
"description": "",
"workItemTypeName": "Feature",
"_links": {
"workItemType": {
"href": "https://dev.azure.com/fabrikamm0652/00487116-45c8-4be1-a19b-ae0de259e618/_apis/wit/workItemTypes/Feature"
},
"self": {
"href": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/d1e32bd5-98f6-4ad6-b035-e131aa1b4cdb"
}
},
"url": "https://dev.azure.com/fabrikamm0652/Test%20Project/3481fbc6-b38e-4a68-ae98-53720872d5db/_apis/wit/templates/d1e32bd5-98f6-4ad6-b035-e131aa1b4cdb"
}
]
}
Definitions
Name | Description |
---|---|
Reference |
The class to represent a collection of REST reference links. |
Work |
Describes a shallow reference to a work item template. |
ReferenceLinks
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. |
WorkItemTemplateReference
Describes a shallow reference to a work item template.
Name | Type | Description |
---|---|---|
_links |
Link references to related REST resources. |
|
description |
string |
The description of the work item template. |
id |
string |
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. |