Authorization: Bearer ********************
{
"principal_id": "547000eb6a70571487623fea",
"principal_type": "test_run",
"target_type": "work_item",
"target_id": "5edca524cad2fa1125cb0630"
}
curl --location --request POST 'https://open.pingcode.com/v1/relations' \
--header 'Content-Type: application/json' \
--data-raw '{
"principal_id": "547000eb6a70571487623fea",
"principal_type": "test_run",
"target_type": "work_item",
"target_id": "5edca524cad2fa1125cb0630"
}'
{
"id": "fa1125cb06305edca524cad2",
"url": "https://rest_api_root/v1/relations/fa1125cb06305edca524cad2",
"principal_type": "test_run",
"principal": {
"id": "547000eb6a70571487623fea",
"url": "https://rest_api_root/v1/testhub/runs/547000eb6a70571487623fea",
"status": "failure"
},
"target_type": "work_item",
"target": {
"id": "5edca524cad2fa1125cb0630",
"url": "https://rest_api_root/v1/project/work_items/5edca524cad2fa1125cb0630",
"identifier": "SCR-5",
"title": "这是一个缺陷",
"type": "bug",
"start_at": 1583290309,
"end_at": 1583290347,
"parent_id": "5edca524cad2fa112b06105c"
}
}