Navigation¶
Top-Level Navigation¶
Getting the top navigation items:
GET /plone/front-page/@navigation HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i 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": "",
"title": "Home"
},
{
"@id": "http://localhost:55001/plone/front-page",
"description": "Congratulations! You have successfully installed Plone.",
"title": "Welcome to Plone"
}
]
}
Navigation Tree¶
Getting the navigation item tree 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 '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": "",
"title": "Home"
},
{
"@id": "http://localhost:55001/plone/front-page",
"description": "Congratulations! You have successfully installed Plone.",
"items": [],
"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": "",
"title": "Fourth Level Folder"
}
],
"title": "Third Level Folder"
}
],
"title": "SubFolder 1"
},
{
"@id": "http://localhost:55001/plone/folder/subfolder2",
"description": "",
"title": "SubFolder 2"
},
{
"@id": "http://localhost:55001/plone/folder/doc1",
"description": "",
"title": "A document"
}
],
"title": "Some Folder"
},
{
"@id": "http://localhost:55001/plone/folder2",
"description": "",
"items": [],
"title": "Some Folder 2"
}
]
}