logo

plone.restapi v8.21.3.dev0

Table of Contents

  • Introduction
    • More on Content Negotiation
    • Representation of all standard Plone content types
  • Authentication
  • Explore the API using Postman
  • Content Manipulation
  • Volto Blocks support
  • History
  • Batching
  • Add-ons
  • Comments
  • Copy and Move
  • Expansion
  • Portal Actions
  • Workflow
  • Working Copy
  • Locking
  • Sharing
  • Registry
  • Types
  • Types Schema
  • Users
  • Groups
  • Principals
  • Roles
  • Breadcrumbs
  • Navigation
  • Context Navigation
  • Serialization
  • Search
  • TUS resumable upload
  • Vocabularies and Sources
  • Control Panels
  • Tiles
  • Querystring
  • Querystring Search
  • Customizing the API
  • Conventions
  • Translations
  • Email Send
  • i18n: internationalization of screen messages
  • Email Notification
  • System
  • Database
  • Upgrade Guide
  • Contributing to plone.restapi
  • HTTP Status Codes
  • Glossary

plone.org plone.org

  • repository
  • open issue
  • suggest edit
  • .md
Contents
  • Top-Level Navigation
  • Navigation Tree

Navigation

Contents

  • Top-Level Navigation
  • Navigation Tree

Navigation#

Top-Level Navigation#

Get the top-level navigation items:

http

GET /plone/front-page/@navigation HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET http://nohost/plone/front-page/@navigation -H "Accept: application/json" --user admin:secret

httpie

http http://nohost/plone/front-page/@navigation Accept:application/json -a admin:secret

python-requests

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:

http

GET /plone/front-page/@navigation?expand.navigation.depth=4 HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET 'http://nohost/plone/front-page/@navigation?expand.navigation.depth=4' -H "Accept: application/json" --user admin:secret

httpie

http 'http://nohost/plone/front-page/@navigation?expand.navigation.depth=4' Accept:application/json -a admin:secret

python-requests

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"
        }
    ]
}

previous

Breadcrumbs

next

Context Navigation

© Copyright 2014-2022, Plone Foundation.

The text and illustrations in this website are licensed by the Plone Foundation under a Creative Commons Attribution 4.0 International license. Plone and the PloneĀ® logo are registered trademarks of the Plone Foundation, registered in the United States and other countries. For guidelines on the permitted uses of the Plone trademarks, see https://plone.org/foundation/logo. All other trademarks are owned by their respective owners.

Deploys by Netlify