Work Item Type Categories - Get

按名称获取特定工作项类型类别。

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypecategories/{category}?api-version=7.1-preview.2

URI 参数

名称 必需 类型 说明
category
path True

string

类别名称

organization
path True

string

Azure DevOps 组织的名称。

project
path True

string

项目 ID 或项目名称

api-version
query True

string

要使用的 API 版本。 应将其设置为“7.1-preview.2”才能使用此版本的 API。

响应

名称 类型 说明
200 OK

WorkItemTypeCategory

成功的操作

安全性

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

名称 说明
vso.work 授予读取工作项、查询、板、区域和迭代路径以及其他工作项跟踪相关元数据的能力。 此外,还允许通过服务挂钩执行查询、搜索工作项和接收有关工作项事件的通知。

示例

Get category by name

Sample Request

GET https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/wit/workitemtypecategories/{category}?api-version=7.1-preview.2

Sample Response

{
  "name": "Requirement Category",
  "referenceName": "Microsoft.RequirementCategory",
  "defaultWorkItemType": {
    "name": "Product Backlog Item",
    "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
  },
  "workItemTypes": [
    {
      "name": "Product Backlog Item",
      "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypes/Product%20Backlog%20Item"
    }
  ],
  "url": "https://dev.azure.com/fabrikam/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c/_apis/wit/workItemTypeCategories/Microsoft.RequirementCategory"
}

定义

名称 说明
ReferenceLinks

表示 REST 引用链接集合的类。

WorkItemTypeCategory

描述工作项类型类别。

WorkItemTypeReference

对工作项类型的引用。

表示 REST 引用链接集合的类。

名称 类型 说明
links

object

链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读。

WorkItemTypeCategory

描述工作项类型类别。

名称 类型 说明
_links

ReferenceLinks

将引用链接到相关的 REST 资源。

defaultWorkItemType

WorkItemTypeReference

获取或设置工作项的默认类型。

name

string

类别的名称。

referenceName

string

类别的引用名称。

url

string

workItemTypes

WorkItemTypeReference[]

属于该类别的工作项类型。

WorkItemTypeReference

对工作项类型的引用。

名称 类型 说明
name

string

工作项类型的名称。

url

string