Templates - List
Mendapatkan templat
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?api-version=7.1-preview.1
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?workitemtypename={workitemtypename}&api-version=7.1-preview.1
Parameter URI
Nama | Dalam | Diperlukan | Jenis | Deskripsi |
---|---|---|---|---|
organization
|
path | True |
string |
Nama organisasi Azure DevOps. |
project
|
path | True |
string |
ID proyek atau nama proyek |
team
|
path | True |
string |
ID tim atau nama tim |
api-version
|
query | True |
string |
Versi API yang akan digunakan. Ini harus diatur ke '7.1-preview.1' untuk menggunakan versi api ini. |
workitemtypename
|
query |
string |
Opsional, Saat ditentukan mengembalikan templat untuk jenis item Pekerjaan tertentu. |
Respons
Nama | Jenis | Deskripsi |
---|---|---|
200 OK |
operasi berhasil |
Keamanan
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
Nama | Deskripsi |
---|---|
vso.work | Memberikan kemampuan untuk membaca item kerja, kueri, papan, jalur perulangan dan area, serta metadata terkait pelacakan item kerja lainnya. Juga memberikan kemampuan untuk menjalankan kueri, mencari item kerja, dan menerima pemberitahuan tentang peristiwa item kerja melalui kait layanan. |
Contoh
Gets templates
Sample Request
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/templates?api-version=7.1-preview.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"
}
]
}
Definisi
Nama | Deskripsi |
---|---|
Reference |
Kelas untuk mewakili kumpulan tautan referensi REST. |
Work |
Menjelaskan referensi dangkal ke templat item kerja. |
ReferenceLinks
Kelas untuk mewakili kumpulan tautan referensi REST.
Nama | Jenis | Deskripsi |
---|---|---|
links |
object |
Tampilan baca-saja dari tautan. Karena tautan Referensi dibaca saja, kami hanya ingin mengeksposnya sebagai baca-saja. |
WorkItemTemplateReference
Menjelaskan referensi dangkal ke templat item kerja.
Nama | Jenis | Deskripsi |
---|---|---|
_links |
Menautkan referensi ke sumber daya REST terkait. |
|
description |
string |
Deskripsi templat item kerja. |
id |
string |
Pengidentifikasi templat item kerja. |
name |
string |
Nama templat item kerja. |
url |
string |
|
workItemTypeName |
string |
Nama tipe item kerja. |