Work Item Relation Types - Get

获取工作项关系类型定义。

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

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

relation
path True

string

关系名称

api-version
query True

string

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

响应

名称 类型 说明
200 OK

WorkItemRelationType

成功的操作

安全性

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 the work item relation type

Sample Request

GET https://dev.azure.com/fabrikam/_apis/wit/workitemrelationtypes/{relation}?api-version=7.1-preview.2

Sample Response

{
  "attributes": {
    "usage": "workItemLink",
    "editable": false,
    "enabled": true,
    "acyclic": true,
    "directional": true,
    "singleTarget": false,
    "topology": "tree",
    "isForward": true,
    "oppositeEndReferenceName": "System.LinkTypes.Duplicate-Reverse"
  },
  "referenceName": "System.LinkTypes.Duplicate-Forward",
  "name": "Duplicate",
  "url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Duplicate-Forward"
}

定义

名称 说明
ReferenceLinks

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

WorkItemRelationType

表示工作项类型关系类型。

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

名称 类型 说明
links

object

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

WorkItemRelationType

表示工作项类型关系类型。

名称 类型 说明
_links

ReferenceLinks

链接对相关 REST 资源的引用。

attributes

object

关系类型特性的集合。

name

string

名称。

referenceName

string

引用名称。

url

string