Work Item Relation Types - List
获取工作项关系类型。
GET https://dev.azure.com/{organization}/_apis/wit/workitemrelationtypes?api-version=6.0
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
api-version
|
query | True |
string |
要使用的 API 版本。 应将其设置为“6.0”才能使用此版本的 API。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的操作 |
安全性
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 types
Sample Request
GET https://dev.azure.com/fabrikam/_apis/wit/workitemrelationtypes?api-version=6.0
Sample Response
{
"count": 18,
"value": [
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": true,
"oppositeEndReferenceName": "Microsoft.VSTS.Common.Affects-Reverse"
},
"referenceName": "Microsoft.VSTS.Common.Affects-Forward",
"name": "Affects",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.Common.Affects-Forward"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": false,
"oppositeEndReferenceName": "Microsoft.VSTS.Common.Affects-Forward"
},
"referenceName": "Microsoft.VSTS.Common.Affects-Reverse",
"name": "Affected By",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.Common.Affects-Reverse"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": true,
"oppositeEndReferenceName": "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Reverse"
},
"referenceName": "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Forward",
"name": "Referenced By",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Forward"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": false,
"oppositeEndReferenceName": "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Forward"
},
"referenceName": "Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Reverse",
"name": "References",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedParameterReferencedBy-Reverse"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": true,
"oppositeEndReferenceName": "Microsoft.VSTS.Common.TestedBy-Reverse"
},
"referenceName": "Microsoft.VSTS.Common.TestedBy-Forward",
"name": "Tested By",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.Common.TestedBy-Forward"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": false,
"oppositeEndReferenceName": "Microsoft.VSTS.Common.TestedBy-Forward"
},
"referenceName": "Microsoft.VSTS.Common.TestedBy-Reverse",
"name": "Tests",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.Common.TestedBy-Reverse"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": true,
"oppositeEndReferenceName": "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Reverse"
},
"referenceName": "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Forward",
"name": "Test Case",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedStepReferencedBy-Forward"
},
{
"attributes": {
"usage": "workItemLink",
"editable": true,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": false,
"oppositeEndReferenceName": "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Forward"
},
"referenceName": "Microsoft.VSTS.TestCase.SharedStepReferencedBy-Reverse",
"name": "Shared Steps",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Microsoft.VSTS.TestCase.SharedStepReferencedBy-Reverse"
},
{
"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"
},
{
"attributes": {
"usage": "workItemLink",
"editable": false,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": false,
"topology": "tree",
"isForward": false,
"oppositeEndReferenceName": "System.LinkTypes.Duplicate-Forward"
},
"referenceName": "System.LinkTypes.Duplicate-Reverse",
"name": "Duplicate Of",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Duplicate-Reverse"
},
{
"attributes": {
"usage": "workItemLink",
"editable": false,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": true,
"oppositeEndReferenceName": "System.LinkTypes.Dependency-Reverse"
},
"referenceName": "System.LinkTypes.Dependency-Forward",
"name": "Successor",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Dependency-Forward"
},
{
"attributes": {
"usage": "workItemLink",
"editable": false,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": true,
"topology": "dependency",
"isForward": false,
"oppositeEndReferenceName": "System.LinkTypes.Dependency-Forward"
},
"referenceName": "System.LinkTypes.Dependency-Reverse",
"name": "Predecessor",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Dependency-Reverse"
},
{
"attributes": {
"usage": "workItemLink",
"editable": false,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": false,
"topology": "tree",
"isForward": true,
"oppositeEndReferenceName": "System.LinkTypes.Hierarchy-Reverse"
},
"referenceName": "System.LinkTypes.Hierarchy-Forward",
"name": "Child",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Hierarchy-Forward"
},
{
"attributes": {
"usage": "workItemLink",
"editable": false,
"enabled": true,
"acyclic": true,
"directional": true,
"singleTarget": false,
"topology": "tree",
"isForward": false,
"oppositeEndReferenceName": "System.LinkTypes.Hierarchy-Forward"
},
"referenceName": "System.LinkTypes.Hierarchy-Reverse",
"name": "Parent",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Hierarchy-Reverse"
},
{
"attributes": {
"usage": "workItemLink",
"editable": false,
"enabled": true,
"acyclic": false,
"directional": false,
"singleTarget": true,
"topology": "network"
},
"referenceName": "System.LinkTypes.Related",
"name": "Related",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/System.LinkTypes.Related"
},
{
"attributes": {
"usage": "resourceLink",
"editable": false,
"enabled": true
},
"referenceName": "AttachedFile",
"name": "Attached File",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/AttachedFile"
},
{
"attributes": {
"usage": "resourceLink",
"editable": false,
"enabled": true
},
"referenceName": "Hyperlink",
"name": "Hyperlink",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/Hyperlink"
},
{
"attributes": {
"usage": "resourceLink",
"editable": false,
"enabled": true
},
"referenceName": "ArtifactLink",
"name": "Artifact Link",
"url": "https://dev.azure.com/fabrikam/_apis/wit/workItemRelationTypes/ArtifactLink"
}
]
}
定义
名称 | 说明 |
---|---|
Reference |
表示 REST 引用链接集合的类。 |
Work |
表示工作项类型关系类型。 |
ReferenceLinks
表示 REST 引用链接集合的类。
名称 | 类型 | 说明 |
---|---|---|
links |
object |
链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读。 |
WorkItemRelationType
表示工作项类型关系类型。
名称 | 类型 | 说明 |
---|---|---|
_links |
将引用链接到相关的 REST 资源。 |
|
attributes |
object |
关系类型属性的集合。 |
name |
string |
名称。 |
referenceName |
string |
引用名称。 |
url |
string |