Navigation#
Top-Level Navigation#
Get the top-level navigation items:
GET /plone/front-page/@navigation HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET http://nohost/plone/front-page/@navigation -H "Accept: application/json" --user admin:secret
http http://nohost/plone/front-page/@navigation Accept:application/json -a admin:secret
requests.get('http://nohost/plone/front-page/@navigation', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/front-page/@navigation",
"items": [
{
"@id": "http://localhost:55001/plone",
"description": "",
"items": [],
"review_state": null,
"title": "Home"
},
{
"@id": "http://localhost:55001/plone/front-page",
"description": "Congratulations! You have successfully installed Plone.",
"items": [],
"review_state": "private",
"title": "Welcome to Plone"
}
]
}
Navigation Tree#
Get the navigation item tree by providing a expand.navigation.depth
parameter:
GET /plone/front-page/@navigation?expand.navigation.depth=4 HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i -X GET 'http://nohost/plone/front-page/@navigation?expand.navigation.depth=4' -H "Accept: application/json" --user admin:secret
http 'http://nohost/plone/front-page/@navigation?expand.navigation.depth=4' Accept:application/json -a admin:secret
requests.get('http://nohost/plone/front-page/@navigation?expand.navigation.depth=4', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"@id": "http://localhost:55001/plone/front-page/@navigation",
"items": [
{
"@id": "http://localhost:55001/plone",
"description": "",
"items": [],
"review_state": null,
"title": "Home"
},
{
"@id": "http://localhost:55001/plone/front-page",
"description": "Congratulations! You have successfully installed Plone.",
"items": [],
"review_state": "private",
"title": "Welcome to Plone"
},
{
"@id": "http://localhost:55001/plone/folder",
"description": "",
"items": [
{
"@id": "http://localhost:55001/plone/folder/subfolder1",
"description": "",
"items": [
{
"@id": "http://localhost:55001/plone/folder/subfolder1/thirdlevelfolder",
"description": "",
"items": [
{
"@id": "http://localhost:55001/plone/folder/subfolder1/thirdlevelfolder/fourthlevelfolder",
"description": "",
"items": [],
"review_state": "private",
"title": "Fourth Level Folder",
"use_view_action_in_listings": false
}
],
"review_state": "private",
"title": "Third Level Folder",
"use_view_action_in_listings": false
}
],
"review_state": "private",
"title": "SubFolder 1",
"use_view_action_in_listings": false
},
{
"@id": "http://localhost:55001/plone/folder/subfolder2",
"description": "",
"items": [],
"review_state": "private",
"title": "SubFolder 2",
"use_view_action_in_listings": false
},
{
"@id": "http://localhost:55001/plone/folder/doc1",
"description": "",
"items": [],
"review_state": "private",
"title": "A document",
"use_view_action_in_listings": false
}
],
"review_state": "private",
"title": "Some Folder"
},
{
"@id": "http://localhost:55001/plone/folder2",
"description": "",
"items": [],
"review_state": "private",
"title": "Some Folder 2"
}
]
}