In docu. There is an example how to create some kind of relation between packages but there is nothing about creating a parent child relation. Maybe someone knows how to do this?
This is what is available in the docu:
and these are the only available relations:
How to make the Parent <-> Child relation so that it looks like this in open project:
Although parent-child relations are in fact relations (conceptually and in the db), they are not treated as such in the API (mostly for historic reasons).
Therefore, one needs to set the parent via the work package resource. A minimal payload on a PATCH to /api/v3/work_packages/:id
(the work package to become the child) would look like this:
{
"lockVersion": [the correct version],
"_links": {
"parent": {
"href": "/api/v3/work_packages/[ID of the work package to become the parent]"
}
}
}
Edit
There is actually an example in the API documentation. You need to open the "Request" example for the PATCH to `/api/v3/work_packages/:id to see it, though.