Templates - Create
Creates a template
POST https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?api-version=5.1-preview.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 '5.1-preview.1' to use this version of the api. |
Request Body
Name | Type | Description |
---|---|---|
_links |
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 |
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. |
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_write | Grants the ability to read, create, and update work items and queries, update board metadata, read area and iterations paths other work item tracking related metadata, execute queries, and to receive notifications about work item events via service hooks. |
Examples
Creates a template
Sample Request
POST https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?api-version=5.1-preview.1
{
"fields": {
"System.State": "New"
},
"name": "Test Template",
"description": "Template to be created",
"workItemTypeName": "Feature",
"url": null
}
Sample Response
{
"fields": {
"System.State": "New"
},
"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"
}
Definitions
Name | Description |
---|---|
Reference |
The class to represent a collection of REST reference links. |
Work |
Describes 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. |
WorkItemTemplate
Describes a work item template.
Name | Type | Description |
---|---|---|
_links |
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 |
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. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for