Ctrl+K
Logo image

Table of Contents

  • Introduction
  • Usage
    • Authentication
    • Batching
    • Content Manipulation
    • Customizing the API
    • Explore the API using Postman
    • i18n: internationalization of screen messages
    • Serialization
    • Sharing
    • Types Schema
    • Volto Blocks support
  • Endpoints
    • Add-ons
    • Aliases
    • Breadcrumbs
    • Comments
    • Content Types
    • Content Rules
    • Context Navigation
    • Control Panels
    • Copy and Move
    • Database
    • Email Notification
    • Email Send
    • Expansion
    • Groups
    • History
    • Link Integrity
    • Locking
    • Navigation
    • Portal Actions
    • Portraits
    • Principals
    • Querystring
    • Querystring Search
    • Registry
    • Roles
    • Search
    • System
    • Tiles
    • Transactions
    • Translations
    • TUS resumable upload
    • Types
    • Upgrade
    • Users
    • User schema
    • Vocabularies and Sources
    • Workflow
    • Working Copy
  • Upgrade Guide
  • Contributing to plone.restapi
    • Conventions
  • HTTP Status Codes
  • Glossary
  • Repository
  • Suggest edit
  • Open issue
  • .md

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

Locking

next

Portal Actions

Contents
  • Top-Level Navigation
  • Navigation Tree

© Copyright 2014-2023, 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