List work item relations
Return the work item's relations as one map, keyed by relation label. Each value lists the ids of the work items related under that label, from this work item's side. A relation created as "ENG-42 tests ENG-17" shows under tests on ENG-42 and under tested by on ENG-17.
The map has a key for every label of every active relation definition, including empty ones. Relations that use an inactive definition, and related work items you can't see, are left out. The response isn't paginated.
The map holds ids only. Fetch the work items through the work items API when you need their details.
Path parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
project_id:requiredstringThe project the resource belongs to. Accepts the project UUID or its bare identifier, for example ENG.
work_item_id:requiredstringThe work item the resource belongs to. Accepts the work item UUID or its PROJ-123 identifier.
Scopes
projects.work_items.relations:read
Errors
| Status | Code | Cause |
|---|---|---|
401 | unauthorized | Missing or invalid credentials. |
403 | forbidden | You can't view this work item, or your token scope doesn't allow this. |
404 | not_found | No such workspace, project, or work item, you can't see the work item, or it's archived. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
curl -X GET \
"https://api.plane.so/api/v2/workspaces/my-team/projects/4af68566-94a4-4eb3-94aa-50dc9427067b/work-items/8c3d1f72-4a9e-4b65-9d20-6e1f3b7a5c48/relations/" \
-H "X-Api-Key: $PLANE_API_KEY"import requests
response = requests.get(
"https://api.plane.so/api/v2/workspaces/my-team/projects/4af68566-94a4-4eb3-94aa-50dc9427067b/work-items/8c3d1f72-4a9e-4b65-9d20-6e1f3b7a5c48/relations/",
headers={"X-Api-Key": "your-api-key"},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/projects/4af68566-94a4-4eb3-94aa-50dc9427067b/work-items/8c3d1f72-4a9e-4b65-9d20-6e1f3b7a5c48/relations/",
{
method: "GET",
headers: {
"X-Api-Key": "your-api-key",
},
},
);
const data = await response.json();{
"relates to": ["f3b8a1c6-2d7e-4a95-8c14-5e9d0b3f7a28"],
"duplicate": [],
"implements": [],
"implemented by": ["6e2a9d47-1c5b-4f83-a7d0-3b8e4f1c9a62"],
"tests": ["9c1f0b3d-6d2e-4c9a-8b41-2f7e5a0d6c88", "3d8f5a62-7b1e-4c94-a0d3-9e6c2f8b1a57"],
"tested by": []
}
