post https://api.productboard.com/v2/entities//relationships
Creates a relationship between two Entities.
Specify the source entity via the URL path ({id}
), and the target entity and relationship type in the request body.
The type
field determines the direction and nature of the relationship.
Supported values:
parent
– declare the target as the parent of the sourcechild
– declare the target as the child of the sourcelink
– create a non-hierarchical connection between entities
Limitations
- Only valid combinations of source and target entities are allowed for each relationship type.
- The target entity must exist and be accessible.
Code examples
Replace <entity-id>
with the ID of the source entity.
Replace <target-id>
with the ID of the related entity.
Replace <your-token>
with a valid API token.
Set a component as the parent of a feature:
curl -X POST "https://api.productboard.com/v2/entities/<entity-id>/relationships" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"target": { "id": "<target-id>" },
"type": "parent"
}
}'
Connect a key result to an objective:
curl -X POST "https://api.productboard.com/v2/entities/<entity-id>/relationships" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"target": { "id": "<target-id>" },
"type": "child"
}
}'
Create a non-hierarchical link between two initiatives:
curl -X POST "https://api.productboard.com/v2/entities/<entity-id>/relationships" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"target": { "id": "<target-id>" },
"type": "link"
}
}'