关联操作
创建关联
通过以下端点,可以在 Codebeamer 实体之间创建关联。
这会在两个跟踪器项之间创建 depends on 类型的关联。
根据
关联 API 文档的说明,
from 和
to 特性均为
AbstractReference 模型。
这表示,除了跟踪器项之外,还可以提供任何引用类型,或为常规 URL 类型的关联创建可选的
url 参数。有关详情,请参阅
继承和抽象模型。
URL
POST /v3/associations
示例请求正文
{
"name": "Example Association",
"description": "Example desc",
"descriptionFormat": "PlainText",
"from": {
"id": 2864366,
"name": "Item 1",
"type": "TrackerItemReference"
},
"to": {
"id": 2864386,
"name": "Item 2",
"type": "TrackerItemReference"
},
"type": {
"id": 1,
"name": "depends",
"descriptionFormat": "PlainText"
},
"propagatingSuspects": true,
"biDirectionalPropagation": true,
"propagatingDependencies": true
}
获取关联类型
通过以下端点,可以获取可用类型的关联。
URL
GET /v3/associations/types
示例响应正文
[
{
"id": 1,
"name": "depends",
"descriptionFormat": "PlainText"
},
{
"id": 2,
"name": "parent",
"descriptionFormat": "PlainText"
},
{
"id": 3,
"name": "child",
"descriptionFormat": "PlainText"
},
...
]
父主题