Hey there
I’ve created a tree model to link all the pages I want to show in my navbar.
I can easily get all the entries in said content item by making a GET request to
COCKPIT_HOST/api/content/items/navbar
This gives me a result similar to this:
[
{
"page": "pages://7fe0f08d313737efe2000188",
"pagename": "Page 1",
"_pid": null,
"_o": 0,
"_modified": 1660654033,
"_mby": "7f6f355e303630fdc8000059",
"_created": 1660650431,
"_state": 1,
"_cby": "7f6f355e303630fdc8000059",
"_id": "80ca765738376179670000ad"
},
{
"page": "pages://80b0ed4033376434f30002b6",
"pagename": "Page 2",
"_pid": null,
"_o": 2,
"_modified": 1660654054,
"_mby": "7f6f355e303630fdc8000059",
"_created": 1660650447,
"_state": 1,
"_cby": "7f6f355e303630fdc8000059",
"_id": "80ccdc9b3866613e8c00027f"
},
{ ... }
]
So far so good.
But what if Page 2 is set as a child of Page 1 in my tree structure? Where can I see this in the API’s response? I can’t see a children
, or parent
object that indicates that certain entries are linked in a relation.
Am I using the wrong endpoint for this?
Thanks everyone