Partilhar via


Templates - List

Obtém o modelo

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

Parâmetros de URI

Nome Em Obrigatório Tipo Description
organization
path True

string

O nome da organização do Azure DevOps.

project
path True

string

ID do projeto ou nome do projeto

team
path True

string

ID da equipe ou nome da equipe

api-version
query True

string

Versão da API a ser usada. Isso deve ser definido como '7.1-preview.1' para usar essa versão da api.

workitemtypename
query

string

Opcional, Quando especificado retorna modelos para determinado tipo de item de trabalho.

Respostas

Nome Tipo Description
200 OK

WorkItemTemplateReference[]

operação bem-sucedida

Segurança

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

Nome Description
vso.work Concede a capacidade de ler itens de trabalho, consultas, quadros, caminhos de área e iterações e outros metadados relacionados ao acompanhamento de itens de trabalho. Também concede a capacidade de executar consultas, pesquisar itens de trabalho e receber notificações sobre eventos de item de trabalho por meio de ganchos de serviço.

Exemplos

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"
    }
  ]
}

Definições

Nome Description
ReferenceLinks

A classe para representar uma coleção de links de referência REST.

WorkItemTemplateReference

Descreve uma referência superficial a um modelo de item de trabalho.

A classe para representar uma coleção de links de referência REST.

Nome Tipo Description
links

object

A exibição somente leitura dos links. Como os links de referência são somente leitura, só queremos expô-los como somente leitura.

WorkItemTemplateReference

Descreve uma referência superficial a um modelo de item de trabalho.

Nome Tipo Description
_links

ReferenceLinks

Vincular referências a recursos REST relacionados.

description

string

A descrição do modelo de item de trabalho.

id

string

O identificador do modelo de item de trabalho.

name

string

O nome do modelo de item de trabalho.

url

string

workItemTypeName

string

O nome do tipo de item de trabalho.