Ctrl+K
Logo image

Table of Contents

  • Introduction
  • Usage
    • Authentication
    • Batching
    • Content Manipulation
    • Customizing the API
    • Expansion
    • 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
    • Groups
    • History
    • Link Integrity
    • Locking
    • Navigation
    • Navigation root
    • Portal Actions
    • Portraits
    • Principals
    • Querystring
    • Querystring Search
    • Registry
    • Relations
    • Roles
    • Search
    • Site
    • System
    • 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 root

Contents

  • Expansion

Navigation root#

Plone has a concept called navigation root which provides a way to root catalog queries, searches, breadcrumbs, and so on in a given section of the site. This feature is useful when working with subsites or multilingual sites, because it allows the site manager to restrict searches or navigation queries to a specific location in the site.

This navigation root information is different depending on the context of the request. For instance, in a default multilingual site when browsing the contents inside a language folder such as www.domain.com/en, the context is en and its navigation root will be /en/. In a non-multilingual site, the context is the root of the site such as www.domain.com and the navigation root will be /.

To get the information about the navigation root, the REST API has a @navroot contextual endpoint. For instance, send a GET request to the @navroot endpoint at the root of the site:

http

GET /plone/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

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

httpie

http http://nohost/plone/@navroot Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain the navigation root information for the site:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/@navroot",
    "navroot": {
        "@components": {
            "actions": {
                "@id": "http://localhost:55001/plone/@actions"
            },
            "aliases": {
                "@id": "http://localhost:55001/plone/@aliases"
            },
            "breadcrumbs": {
                "@id": "http://localhost:55001/plone/@breadcrumbs"
            },
            "contextnavigation": {
                "@id": "http://localhost:55001/plone/@contextnavigation"
            },
            "navigation": {
                "@id": "http://localhost:55001/plone/@navigation"
            },
            "navroot": {
                "@id": "http://localhost:55001/plone/@navroot"
            },
            "types": {
                "@id": "http://localhost:55001/plone/@types"
            },
            "workflow": {
                "@id": "http://localhost:55001/plone/@workflow"
            }
        },
        "@id": "http://localhost:55001/plone",
        "@type": "Plone Site",
        "UID": "55c25ebc220d400393574f37d648727c",
        "allow_discussion": null,
        "contributors": [],
        "creators": [
            "admin"
        ],
        "description": "",
        "effective": null,
        "exclude_from_nav": false,
        "expires": null,
        "id": "plone",
        "is_folderish": true,
        "items": [
            {
                "@id": "http://localhost:55001/plone/front-page",
                "@type": "Document",
                "description": "Congratulations! You have successfully installed Plone.",
                "review_state": "private",
                "title": "Welcome to Plone",
                "type_title": "Page"
            }
        ],
        "items_total": 1,
        "language": {
            "title": "English",
            "token": "en"
        },
        "lock": {
            "locked": false,
            "stealable": true
        },
        "parent": {},
        "relatedItems": [],
        "review_state": null,
        "rights": "",
        "subjects": [],
        "table_of_contents": null,
        "text": null,
        "title": "Plone site",
        "type_title": "Plone Site"
    }
}

If you request the @navroot of a given content item in the site:

http

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

curl

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

httpie

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

python-requests

requests.get('http://nohost/plone/front-page/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain the navigation root information in the context of that content item:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/front-page/@navroot",
    "navroot": {
        "@components": {
            "actions": {
                "@id": "http://localhost:55001/plone/@actions"
            },
            "aliases": {
                "@id": "http://localhost:55001/plone/@aliases"
            },
            "breadcrumbs": {
                "@id": "http://localhost:55001/plone/@breadcrumbs"
            },
            "contextnavigation": {
                "@id": "http://localhost:55001/plone/@contextnavigation"
            },
            "navigation": {
                "@id": "http://localhost:55001/plone/@navigation"
            },
            "navroot": {
                "@id": "http://localhost:55001/plone/@navroot"
            },
            "types": {
                "@id": "http://localhost:55001/plone/@types"
            },
            "workflow": {
                "@id": "http://localhost:55001/plone/@workflow"
            }
        },
        "@id": "http://localhost:55001/plone",
        "@type": "Plone Site",
        "UID": "55c25ebc220d400393574f37d648727c",
        "allow_discussion": null,
        "contributors": [],
        "creators": [
            "admin"
        ],
        "description": "",
        "effective": null,
        "exclude_from_nav": false,
        "expires": null,
        "id": "plone",
        "is_folderish": true,
        "items": [
            {
                "@id": "http://localhost:55001/plone/front-page",
                "@type": "Document",
                "description": "Congratulations! You have successfully installed Plone.",
                "review_state": "private",
                "title": "Welcome to Plone",
                "type_title": "Page"
            }
        ],
        "items_total": 1,
        "language": {
            "title": "English",
            "token": "en"
        },
        "lock": {
            "locked": false,
            "stealable": true
        },
        "parent": {},
        "relatedItems": [],
        "review_state": null,
        "rights": "",
        "subjects": [],
        "table_of_contents": null,
        "text": null,
        "title": "Plone site",
        "type_title": "Plone Site"
    }
}

In a multilingual site, the root of the site will work as usual:

http

GET /plone/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

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

httpie

http http://nohost/plone/@navroot Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain the navigation root information of the root of the site:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/@navroot",
    "navroot": {
        "@components": {
            "actions": {
                "@id": "http://localhost:55001/plone/@actions"
            },
            "aliases": {
                "@id": "http://localhost:55001/plone/@aliases"
            },
            "breadcrumbs": {
                "@id": "http://localhost:55001/plone/@breadcrumbs"
            },
            "contextnavigation": {
                "@id": "http://localhost:55001/plone/@contextnavigation"
            },
            "navigation": {
                "@id": "http://localhost:55001/plone/@navigation"
            },
            "navroot": {
                "@id": "http://localhost:55001/plone/@navroot"
            },
            "types": {
                "@id": "http://localhost:55001/plone/@types"
            },
            "workflow": {
                "@id": "http://localhost:55001/plone/@workflow"
            }
        },
        "@id": "http://localhost:55001/plone",
        "@type": "Plone Site",
        "UID": "55c25ebc220d400393574f37d648727c",
        "allow_discussion": null,
        "contributors": [],
        "creators": [
            "admin"
        ],
        "description": "",
        "effective": null,
        "exclude_from_nav": false,
        "expires": null,
        "id": "plone",
        "is_folderish": true,
        "items": [
            {
                "@id": "http://localhost:55001/plone/en",
                "@type": "LRF",
                "description": "",
                "review_state": "published",
                "title": "English",
                "type_title": "Language Root Folder"
            },
            {
                "@id": "http://localhost:55001/plone/de",
                "@type": "LRF",
                "description": "",
                "review_state": "published",
                "title": "Deutsch",
                "type_title": "Language Root Folder"
            },
            {
                "@id": "http://localhost:55001/plone/es",
                "@type": "LRF",
                "description": "",
                "review_state": "published",
                "title": "Espa\u00f1ol",
                "type_title": "Language Root Folder"
            },
            {
                "@id": "http://localhost:55001/plone/fr",
                "@type": "LRF",
                "description": "",
                "review_state": null,
                "title": "Fran\u00e7ais",
                "type_title": "Language Root Folder"
            }
        ],
        "items_total": 4,
        "language": {
            "title": "English",
            "token": "en"
        },
        "lock": {
            "locked": false,
            "stealable": true
        },
        "parent": {},
        "relatedItems": [],
        "review_state": null,
        "rights": "",
        "subjects": [],
        "table_of_contents": null,
        "text": null,
        "title": "Plone site",
        "type_title": "Plone Site"
    }
}

In a multilingual site where the language folder is the navigation root, the response has the language folder information:

http

GET /plone/en/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET http://nohost/plone/en/@navroot -H "Accept: application/json" --user admin:secret

httpie

http http://nohost/plone/en/@navroot Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/en/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain the navigation root information for the language folder:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/en/@navroot",
    "navroot": {
        "@components": {
            "actions": {
                "@id": "http://localhost:55001/plone/en/@actions"
            },
            "aliases": {
                "@id": "http://localhost:55001/plone/en/@aliases"
            },
            "breadcrumbs": {
                "@id": "http://localhost:55001/plone/en/@breadcrumbs"
            },
            "contextnavigation": {
                "@id": "http://localhost:55001/plone/en/@contextnavigation"
            },
            "navigation": {
                "@id": "http://localhost:55001/plone/en/@navigation"
            },
            "navroot": {
                "@id": "http://localhost:55001/plone/en/@navroot"
            },
            "translations": {
                "@id": "http://localhost:55001/plone/en/@translations"
            },
            "types": {
                "@id": "http://localhost:55001/plone/en/@types"
            },
            "workflow": {
                "@id": "http://localhost:55001/plone/en/@workflow"
            }
        },
        "@id": "http://localhost:55001/plone/en",
        "@type": "LRF",
        "UID": "00000000000000000000000000000001",
        "allow_discussion": false,
        "contributors": [],
        "created": "1995-07-31T13:45:00+00:00",
        "creators": [
            "admin"
        ],
        "description": "",
        "effective": null,
        "exclude_from_nav": true,
        "expires": null,
        "id": "en",
        "is_folderish": true,
        "items": [
            {
                "@id": "http://localhost:55001/plone/en/assets",
                "@type": "LIF",
                "description": "",
                "review_state": "published",
                "title": "Assets",
                "type_title": "Language Independent Folder"
            },
            {
                "@id": "http://localhost:55001/plone/en/test-document",
                "@type": "Document",
                "description": "",
                "review_state": "private",
                "title": "Test document",
                "type_title": "Page"
            }
        ],
        "items_total": 2,
        "language": {
            "title": "English",
            "token": "en"
        },
        "layout": "folder_listing",
        "lock": {},
        "modified": "1995-07-31T17:30:00+00:00",
        "next_item": {
            "@id": "http://localhost:55001/plone/de",
            "@type": "LRF",
            "description": "",
            "title": "Deutsch",
            "type_title": "Language Root Folder"
        },
        "parent": {
            "@id": "http://localhost:55001/plone",
            "@type": "Plone Site",
            "description": "",
            "title": "Plone site",
            "type_title": "Plone Site"
        },
        "previous_item": {},
        "review_state": "published",
        "rights": "",
        "subjects": [],
        "title": "English",
        "type_title": "Language Root Folder",
        "version": "current",
        "working_copy": null,
        "working_copy_of": null
    }
}

In a multilingual site, if the navigation root is requested for content inside a language folder:

http

GET /plone/en/test-document/@navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET http://nohost/plone/en/test-document/@navroot -H "Accept: application/json" --user admin:secret

httpie

http http://nohost/plone/en/test-document/@navroot Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/en/test-document/@navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response has the language folder information as a navigation root:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/en/test-document/@navroot",
    "navroot": {
        "@components": {
            "actions": {
                "@id": "http://localhost:55001/plone/en/@actions"
            },
            "aliases": {
                "@id": "http://localhost:55001/plone/en/@aliases"
            },
            "breadcrumbs": {
                "@id": "http://localhost:55001/plone/en/@breadcrumbs"
            },
            "contextnavigation": {
                "@id": "http://localhost:55001/plone/en/@contextnavigation"
            },
            "navigation": {
                "@id": "http://localhost:55001/plone/en/@navigation"
            },
            "navroot": {
                "@id": "http://localhost:55001/plone/en/@navroot"
            },
            "translations": {
                "@id": "http://localhost:55001/plone/en/@translations"
            },
            "types": {
                "@id": "http://localhost:55001/plone/en/@types"
            },
            "workflow": {
                "@id": "http://localhost:55001/plone/en/@workflow"
            }
        },
        "@id": "http://localhost:55001/plone/en",
        "@type": "LRF",
        "UID": "00000000000000000000000000000001",
        "allow_discussion": false,
        "contributors": [],
        "created": "1995-07-31T13:45:00+00:00",
        "creators": [
            "admin"
        ],
        "description": "",
        "effective": null,
        "exclude_from_nav": true,
        "expires": null,
        "id": "en",
        "is_folderish": true,
        "items": [
            {
                "@id": "http://localhost:55001/plone/en/assets",
                "@type": "LIF",
                "description": "",
                "review_state": "published",
                "title": "Assets",
                "type_title": "Language Independent Folder"
            },
            {
                "@id": "http://localhost:55001/plone/en/test-document",
                "@type": "Document",
                "description": "",
                "review_state": "private",
                "title": "Test document",
                "type_title": "Page"
            }
        ],
        "items_total": 2,
        "language": {
            "title": "English",
            "token": "en"
        },
        "layout": "folder_listing",
        "lock": {},
        "modified": "1995-07-31T17:30:00+00:00",
        "next_item": {
            "@id": "http://localhost:55001/plone/de",
            "@type": "LRF",
            "description": "",
            "title": "Deutsch",
            "type_title": "Language Root Folder"
        },
        "parent": {
            "@id": "http://localhost:55001/plone",
            "@type": "Plone Site",
            "description": "",
            "title": "Plone site",
            "type_title": "Plone Site"
        },
        "previous_item": {},
        "review_state": "published",
        "rights": "",
        "subjects": [],
        "title": "English",
        "type_title": "Language Root Folder",
        "version": "current",
        "working_copy": null,
        "working_copy_of": null
    }
}

Expansion#

This endpoint can be used with the Expansion mechanism which allows getting more information about a content item in one query, avoiding unnecessary requests.

If a simple GET request is made on the content item, a new entry will be shown on the @components entry with the URL of the @navroot endpoint.

In a standard site when querying the site root:

http

GET /plone/?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET 'http://nohost/plone/?expand=navroot' -H "Accept: application/json" --user admin:secret

httpie

http 'http://nohost/plone/?expand=navroot' Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain information of the site root with the navigation expanded:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@components": {
        "actions": {
            "@id": "http://localhost:55001/plone/@actions"
        },
        "aliases": {
            "@id": "http://localhost:55001/plone/@aliases"
        },
        "breadcrumbs": {
            "@id": "http://localhost:55001/plone/@breadcrumbs"
        },
        "contextnavigation": {
            "@id": "http://localhost:55001/plone/@contextnavigation"
        },
        "navigation": {
            "@id": "http://localhost:55001/plone/@navigation"
        },
        "navroot": {
            "@id": "http://localhost:55001/plone/@navroot",
            "navroot": {
                "@components": {
                    "actions": {
                        "@id": "http://localhost:55001/plone/@actions"
                    },
                    "aliases": {
                        "@id": "http://localhost:55001/plone/@aliases"
                    },
                    "breadcrumbs": {
                        "@id": "http://localhost:55001/plone/@breadcrumbs"
                    },
                    "contextnavigation": {
                        "@id": "http://localhost:55001/plone/@contextnavigation"
                    },
                    "navigation": {
                        "@id": "http://localhost:55001/plone/@navigation"
                    },
                    "navroot": {
                        "@id": "http://localhost:55001/plone/@navroot"
                    },
                    "types": {
                        "@id": "http://localhost:55001/plone/@types"
                    },
                    "workflow": {
                        "@id": "http://localhost:55001/plone/@workflow"
                    }
                },
                "@id": "http://localhost:55001/plone",
                "@type": "Plone Site",
                "UID": "55c25ebc220d400393574f37d648727c",
                "allow_discussion": null,
                "contributors": [],
                "creators": [
                    "admin"
                ],
                "description": "",
                "effective": null,
                "exclude_from_nav": false,
                "expires": null,
                "id": "plone",
                "is_folderish": true,
                "items": [
                    {
                        "@id": "http://localhost:55001/plone/front-page",
                        "@type": "Document",
                        "description": "Congratulations! You have successfully installed Plone.",
                        "review_state": "private",
                        "title": "Welcome to Plone",
                        "type_title": "Page"
                    }
                ],
                "items_total": 1,
                "language": {
                    "title": "English",
                    "token": "en"
                },
                "lock": {
                    "locked": false,
                    "stealable": true
                },
                "parent": {},
                "relatedItems": [],
                "review_state": null,
                "rights": "",
                "subjects": [],
                "table_of_contents": null,
                "text": null,
                "title": "Plone site",
                "type_title": "Plone Site"
            }
        },
        "types": {
            "@id": "http://localhost:55001/plone/@types"
        },
        "workflow": {
            "@id": "http://localhost:55001/plone/@workflow"
        }
    },
    "@id": "http://localhost:55001/plone",
    "@type": "Plone Site",
    "UID": "55c25ebc220d400393574f37d648727c",
    "allow_discussion": null,
    "contributors": [],
    "creators": [
        "admin"
    ],
    "description": "",
    "effective": null,
    "exclude_from_nav": false,
    "expires": null,
    "id": "plone",
    "is_folderish": true,
    "items": [
        {
            "@id": "http://localhost:55001/plone/front-page",
            "@type": "Document",
            "description": "Congratulations! You have successfully installed Plone.",
            "review_state": "private",
            "title": "Welcome to Plone",
            "type_title": "Page"
        }
    ],
    "items_total": 1,
    "language": {
        "title": "English",
        "token": "en"
    },
    "lock": {
        "locked": false,
        "stealable": true
    },
    "parent": {},
    "relatedItems": [],
    "review_state": null,
    "rights": "",
    "subjects": [],
    "table_of_contents": null,
    "text": null,
    "title": "Plone site",
    "type_title": "Plone Site"
}

When querying a content item inside the root:

http

GET /plone/front-page?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

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

httpie

http 'http://nohost/plone/front-page?expand=navroot' Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/front-page?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain the information of that content item with its navigation root information expanded:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@components": {
        "actions": {
            "@id": "http://localhost:55001/plone/front-page/@actions"
        },
        "aliases": {
            "@id": "http://localhost:55001/plone/front-page/@aliases"
        },
        "breadcrumbs": {
            "@id": "http://localhost:55001/plone/front-page/@breadcrumbs"
        },
        "contextnavigation": {
            "@id": "http://localhost:55001/plone/front-page/@contextnavigation"
        },
        "navigation": {
            "@id": "http://localhost:55001/plone/front-page/@navigation"
        },
        "navroot": {
            "@id": "http://localhost:55001/plone/front-page/@navroot",
            "navroot": {
                "@components": {
                    "actions": {
                        "@id": "http://localhost:55001/plone/@actions"
                    },
                    "aliases": {
                        "@id": "http://localhost:55001/plone/@aliases"
                    },
                    "breadcrumbs": {
                        "@id": "http://localhost:55001/plone/@breadcrumbs"
                    },
                    "contextnavigation": {
                        "@id": "http://localhost:55001/plone/@contextnavigation"
                    },
                    "navigation": {
                        "@id": "http://localhost:55001/plone/@navigation"
                    },
                    "navroot": {
                        "@id": "http://localhost:55001/plone/@navroot"
                    },
                    "types": {
                        "@id": "http://localhost:55001/plone/@types"
                    },
                    "workflow": {
                        "@id": "http://localhost:55001/plone/@workflow"
                    }
                },
                "@id": "http://localhost:55001/plone",
                "@type": "Plone Site",
                "UID": "55c25ebc220d400393574f37d648727c",
                "allow_discussion": null,
                "contributors": [],
                "creators": [
                    "admin"
                ],
                "description": "",
                "effective": null,
                "exclude_from_nav": false,
                "expires": null,
                "id": "plone",
                "is_folderish": true,
                "items": [
                    {
                        "@id": "http://localhost:55001/plone/front-page",
                        "@type": "Document",
                        "description": "Congratulations! You have successfully installed Plone.",
                        "review_state": "private",
                        "title": "Welcome to Plone",
                        "type_title": "Page"
                    }
                ],
                "items_total": 1,
                "language": {
                    "title": "English",
                    "token": "en"
                },
                "lock": {
                    "locked": false,
                    "stealable": true
                },
                "parent": {},
                "relatedItems": [],
                "review_state": null,
                "rights": "",
                "subjects": [],
                "table_of_contents": null,
                "text": null,
                "title": "Plone site",
                "type_title": "Plone Site"
            }
        },
        "types": {
            "@id": "http://localhost:55001/plone/front-page/@types"
        },
        "workflow": {
            "@id": "http://localhost:55001/plone/front-page/@workflow"
        }
    },
    "@id": "http://localhost:55001/plone/front-page",
    "@type": "Document",
    "UID": "SomeUUID000000000000000000000001",
    "allow_discussion": false,
    "changeNote": "",
    "contributors": [],
    "created": "1995-07-31T13:45:00+00:00",
    "creators": [
        "test_user_1_"
    ],
    "description": "Congratulations! You have successfully installed Plone.",
    "effective": null,
    "exclude_from_nav": false,
    "expires": null,
    "id": "front-page",
    "is_folderish": false,
    "language": "",
    "layout": "document_view",
    "lock": {
        "locked": false,
        "stealable": true
    },
    "modified": "1995-07-31T17:30:00+00:00",
    "next_item": {},
    "parent": {
        "@id": "http://localhost:55001/plone",
        "@type": "Plone Site",
        "description": "",
        "title": "Plone site",
        "type_title": "Plone Site"
    },
    "previous_item": {},
    "relatedItems": [],
    "review_state": "private",
    "rights": "",
    "subjects": [],
    "table_of_contents": null,
    "text": {
        "content-type": "text/plain",
        "data": "<p>If you&#x27;re seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.</p>",
        "encoding": "utf-8"
    },
    "title": "Welcome to Plone",
    "type_title": "Page",
    "version": "current",
    "versioning_enabled": true,
    "working_copy": null,
    "working_copy_of": null
}

In a multilingual site, it works the same. Use the request:

http

GET /plone/?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET 'http://nohost/plone/?expand=navroot' -H "Accept: application/json" --user admin:secret

httpie

http 'http://nohost/plone/?expand=navroot' Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

And the response will contain the navigation root information pointing to the root of the site:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@components": {
        "actions": {
            "@id": "http://localhost:55001/plone/@actions"
        },
        "aliases": {
            "@id": "http://localhost:55001/plone/@aliases"
        },
        "breadcrumbs": {
            "@id": "http://localhost:55001/plone/@breadcrumbs"
        },
        "contextnavigation": {
            "@id": "http://localhost:55001/plone/@contextnavigation"
        },
        "navigation": {
            "@id": "http://localhost:55001/plone/@navigation"
        },
        "navroot": {
            "@id": "http://localhost:55001/plone/@navroot",
            "navroot": {
                "@components": {
                    "actions": {
                        "@id": "http://localhost:55001/plone/@actions"
                    },
                    "aliases": {
                        "@id": "http://localhost:55001/plone/@aliases"
                    },
                    "breadcrumbs": {
                        "@id": "http://localhost:55001/plone/@breadcrumbs"
                    },
                    "contextnavigation": {
                        "@id": "http://localhost:55001/plone/@contextnavigation"
                    },
                    "navigation": {
                        "@id": "http://localhost:55001/plone/@navigation"
                    },
                    "navroot": {
                        "@id": "http://localhost:55001/plone/@navroot"
                    },
                    "types": {
                        "@id": "http://localhost:55001/plone/@types"
                    },
                    "workflow": {
                        "@id": "http://localhost:55001/plone/@workflow"
                    }
                },
                "@id": "http://localhost:55001/plone",
                "@type": "Plone Site",
                "UID": "55c25ebc220d400393574f37d648727c",
                "allow_discussion": null,
                "contributors": [],
                "creators": [
                    "admin"
                ],
                "description": "",
                "effective": null,
                "exclude_from_nav": false,
                "expires": null,
                "id": "plone",
                "is_folderish": true,
                "items": [
                    {
                        "@id": "http://localhost:55001/plone/en",
                        "@type": "LRF",
                        "description": "",
                        "review_state": "published",
                        "title": "English",
                        "type_title": "Language Root Folder"
                    },
                    {
                        "@id": "http://localhost:55001/plone/de",
                        "@type": "LRF",
                        "description": "",
                        "review_state": "published",
                        "title": "Deutsch",
                        "type_title": "Language Root Folder"
                    },
                    {
                        "@id": "http://localhost:55001/plone/es",
                        "@type": "LRF",
                        "description": "",
                        "review_state": "published",
                        "title": "Espa\u00f1ol",
                        "type_title": "Language Root Folder"
                    },
                    {
                        "@id": "http://localhost:55001/plone/fr",
                        "@type": "LRF",
                        "description": "",
                        "review_state": null,
                        "title": "Fran\u00e7ais",
                        "type_title": "Language Root Folder"
                    }
                ],
                "items_total": 4,
                "language": {
                    "title": "English",
                    "token": "en"
                },
                "lock": {
                    "locked": false,
                    "stealable": true
                },
                "parent": {},
                "relatedItems": [],
                "review_state": null,
                "rights": "",
                "subjects": [],
                "table_of_contents": null,
                "text": null,
                "title": "Plone site",
                "type_title": "Plone Site"
            }
        },
        "types": {
            "@id": "http://localhost:55001/plone/@types"
        },
        "workflow": {
            "@id": "http://localhost:55001/plone/@workflow"
        }
    },
    "@id": "http://localhost:55001/plone",
    "@type": "Plone Site",
    "UID": "55c25ebc220d400393574f37d648727c",
    "allow_discussion": null,
    "contributors": [],
    "creators": [
        "admin"
    ],
    "description": "",
    "effective": null,
    "exclude_from_nav": false,
    "expires": null,
    "id": "plone",
    "is_folderish": true,
    "items": [
        {
            "@id": "http://localhost:55001/plone/en",
            "@type": "LRF",
            "description": "",
            "review_state": "published",
            "title": "English",
            "type_title": "Language Root Folder"
        },
        {
            "@id": "http://localhost:55001/plone/de",
            "@type": "LRF",
            "description": "",
            "review_state": "published",
            "title": "Deutsch",
            "type_title": "Language Root Folder"
        },
        {
            "@id": "http://localhost:55001/plone/es",
            "@type": "LRF",
            "description": "",
            "review_state": "published",
            "title": "Espa\u00f1ol",
            "type_title": "Language Root Folder"
        },
        {
            "@id": "http://localhost:55001/plone/fr",
            "@type": "LRF",
            "description": "",
            "review_state": null,
            "title": "Fran\u00e7ais",
            "type_title": "Language Root Folder"
        }
    ],
    "items_total": 4,
    "language": {
        "title": "English",
        "token": "en"
    },
    "lock": {
        "locked": false,
        "stealable": true
    },
    "parent": {},
    "relatedItems": [],
    "review_state": null,
    "rights": "",
    "subjects": [],
    "table_of_contents": null,
    "text": null,
    "title": "Plone site",
    "type_title": "Plone Site"
}

It will also work with language root folders that are navigation roots:

http

GET /plone/en?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET 'http://nohost/plone/en?expand=navroot' -H "Accept: application/json" --user admin:secret

httpie

http 'http://nohost/plone/en?expand=navroot' Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/en?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will contain the navigation root information expanded:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@components": {
        "actions": {
            "@id": "http://localhost:55001/plone/en/@actions"
        },
        "aliases": {
            "@id": "http://localhost:55001/plone/en/@aliases"
        },
        "breadcrumbs": {
            "@id": "http://localhost:55001/plone/en/@breadcrumbs"
        },
        "contextnavigation": {
            "@id": "http://localhost:55001/plone/en/@contextnavigation"
        },
        "navigation": {
            "@id": "http://localhost:55001/plone/en/@navigation"
        },
        "navroot": {
            "@id": "http://localhost:55001/plone/en/@navroot",
            "navroot": {
                "@components": {
                    "actions": {
                        "@id": "http://localhost:55001/plone/en/@actions"
                    },
                    "aliases": {
                        "@id": "http://localhost:55001/plone/en/@aliases"
                    },
                    "breadcrumbs": {
                        "@id": "http://localhost:55001/plone/en/@breadcrumbs"
                    },
                    "contextnavigation": {
                        "@id": "http://localhost:55001/plone/en/@contextnavigation"
                    },
                    "navigation": {
                        "@id": "http://localhost:55001/plone/en/@navigation"
                    },
                    "navroot": {
                        "@id": "http://localhost:55001/plone/en/@navroot"
                    },
                    "translations": {
                        "@id": "http://localhost:55001/plone/en/@translations"
                    },
                    "types": {
                        "@id": "http://localhost:55001/plone/en/@types"
                    },
                    "workflow": {
                        "@id": "http://localhost:55001/plone/en/@workflow"
                    }
                },
                "@id": "http://localhost:55001/plone/en",
                "@type": "LRF",
                "UID": "00000000000000000000000000000001",
                "allow_discussion": false,
                "contributors": [],
                "created": "1995-07-31T13:45:00+00:00",
                "creators": [
                    "admin"
                ],
                "description": "",
                "effective": null,
                "exclude_from_nav": true,
                "expires": null,
                "id": "en",
                "is_folderish": true,
                "items": [
                    {
                        "@id": "http://localhost:55001/plone/en/assets",
                        "@type": "LIF",
                        "description": "",
                        "review_state": "published",
                        "title": "Assets",
                        "type_title": "Language Independent Folder"
                    },
                    {
                        "@id": "http://localhost:55001/plone/en/test-document",
                        "@type": "Document",
                        "description": "",
                        "review_state": "private",
                        "title": "Test document",
                        "type_title": "Page"
                    }
                ],
                "items_total": 2,
                "language": {
                    "title": "English",
                    "token": "en"
                },
                "layout": "folder_listing",
                "lock": {},
                "modified": "1995-07-31T17:30:00+00:00",
                "next_item": {
                    "@id": "http://localhost:55001/plone/de",
                    "@type": "LRF",
                    "description": "",
                    "title": "Deutsch",
                    "type_title": "Language Root Folder"
                },
                "parent": {
                    "@id": "http://localhost:55001/plone",
                    "@type": "Plone Site",
                    "description": "",
                    "title": "Plone site",
                    "type_title": "Plone Site"
                },
                "previous_item": {},
                "review_state": "published",
                "rights": "",
                "subjects": [],
                "title": "English",
                "type_title": "Language Root Folder",
                "version": "current",
                "working_copy": null,
                "working_copy_of": null
            }
        },
        "translations": {
            "@id": "http://localhost:55001/plone/en/@translations"
        },
        "types": {
            "@id": "http://localhost:55001/plone/en/@types"
        },
        "workflow": {
            "@id": "http://localhost:55001/plone/en/@workflow"
        }
    },
    "@id": "http://localhost:55001/plone/en",
    "@type": "LRF",
    "UID": "00000000000000000000000000000001",
    "allow_discussion": false,
    "contributors": [],
    "created": "1995-07-31T13:45:00+00:00",
    "creators": [
        "admin"
    ],
    "description": "",
    "effective": null,
    "exclude_from_nav": true,
    "expires": null,
    "id": "en",
    "is_folderish": true,
    "items": [
        {
            "@id": "http://localhost:55001/plone/en/assets",
            "@type": "LIF",
            "description": "",
            "review_state": "published",
            "title": "Assets",
            "type_title": "Language Independent Folder"
        },
        {
            "@id": "http://localhost:55001/plone/en/test-document",
            "@type": "Document",
            "description": "",
            "review_state": "private",
            "title": "Test document",
            "type_title": "Page"
        }
    ],
    "items_total": 2,
    "language": {
        "title": "English",
        "token": "en"
    },
    "layout": "folder_listing",
    "lock": {},
    "modified": "1995-07-31T17:30:00+00:00",
    "next_item": {
        "@id": "http://localhost:55001/plone/de",
        "@type": "LRF",
        "description": "",
        "title": "Deutsch",
        "type_title": "Language Root Folder"
    },
    "parent": {
        "@id": "http://localhost:55001/plone",
        "@type": "Plone Site",
        "description": "",
        "title": "Plone site",
        "type_title": "Plone Site"
    },
    "previous_item": {},
    "review_state": "published",
    "rights": "",
    "subjects": [],
    "title": "English",
    "type_title": "Language Root Folder",
    "version": "current",
    "working_copy": null,
    "working_copy_of": null
}

And also for content inside the language root folders:

http

GET /plone/en/test-document?expand=navroot HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET 'http://nohost/plone/en/test-document?expand=navroot' -H "Accept: application/json" --user admin:secret

httpie

http 'http://nohost/plone/en/test-document?expand=navroot' Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/en/test-document?expand=navroot', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

The response will include the expanded information pointing to the language root:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@components": {
        "actions": {
            "@id": "http://localhost:55001/plone/en/test-document/@actions"
        },
        "aliases": {
            "@id": "http://localhost:55001/plone/en/test-document/@aliases"
        },
        "breadcrumbs": {
            "@id": "http://localhost:55001/plone/en/test-document/@breadcrumbs"
        },
        "contextnavigation": {
            "@id": "http://localhost:55001/plone/en/test-document/@contextnavigation"
        },
        "navigation": {
            "@id": "http://localhost:55001/plone/en/test-document/@navigation"
        },
        "navroot": {
            "@id": "http://localhost:55001/plone/en/test-document/@navroot",
            "navroot": {
                "@components": {
                    "actions": {
                        "@id": "http://localhost:55001/plone/en/@actions"
                    },
                    "aliases": {
                        "@id": "http://localhost:55001/plone/en/@aliases"
                    },
                    "breadcrumbs": {
                        "@id": "http://localhost:55001/plone/en/@breadcrumbs"
                    },
                    "contextnavigation": {
                        "@id": "http://localhost:55001/plone/en/@contextnavigation"
                    },
                    "navigation": {
                        "@id": "http://localhost:55001/plone/en/@navigation"
                    },
                    "navroot": {
                        "@id": "http://localhost:55001/plone/en/@navroot"
                    },
                    "translations": {
                        "@id": "http://localhost:55001/plone/en/@translations"
                    },
                    "types": {
                        "@id": "http://localhost:55001/plone/en/@types"
                    },
                    "workflow": {
                        "@id": "http://localhost:55001/plone/en/@workflow"
                    }
                },
                "@id": "http://localhost:55001/plone/en",
                "@type": "LRF",
                "UID": "00000000000000000000000000000001",
                "allow_discussion": false,
                "contributors": [],
                "created": "1995-07-31T13:45:00+00:00",
                "creators": [
                    "admin"
                ],
                "description": "",
                "effective": null,
                "exclude_from_nav": true,
                "expires": null,
                "id": "en",
                "is_folderish": true,
                "items": [
                    {
                        "@id": "http://localhost:55001/plone/en/assets",
                        "@type": "LIF",
                        "description": "",
                        "review_state": "published",
                        "title": "Assets",
                        "type_title": "Language Independent Folder"
                    },
                    {
                        "@id": "http://localhost:55001/plone/en/test-document",
                        "@type": "Document",
                        "description": "",
                        "review_state": "private",
                        "title": "Test document",
                        "type_title": "Page"
                    }
                ],
                "items_total": 2,
                "language": {
                    "title": "English",
                    "token": "en"
                },
                "layout": "folder_listing",
                "lock": {},
                "modified": "1995-07-31T17:30:00+00:00",
                "next_item": {
                    "@id": "http://localhost:55001/plone/de",
                    "@type": "LRF",
                    "description": "",
                    "title": "Deutsch",
                    "type_title": "Language Root Folder"
                },
                "parent": {
                    "@id": "http://localhost:55001/plone",
                    "@type": "Plone Site",
                    "description": "",
                    "title": "Plone site",
                    "type_title": "Plone Site"
                },
                "previous_item": {},
                "review_state": "published",
                "rights": "",
                "subjects": [],
                "title": "English",
                "type_title": "Language Root Folder",
                "version": "current",
                "working_copy": null,
                "working_copy_of": null
            }
        },
        "translations": {
            "@id": "http://localhost:55001/plone/en/test-document/@translations"
        },
        "types": {
            "@id": "http://localhost:55001/plone/en/test-document/@types"
        },
        "workflow": {
            "@id": "http://localhost:55001/plone/en/test-document/@workflow"
        }
    },
    "@id": "http://localhost:55001/plone/en/test-document",
    "@type": "Document",
    "UID": "SomeUUID000000000000000000000001",
    "allow_discussion": false,
    "changeNote": "",
    "contributors": [],
    "created": "1995-07-31T13:45:00+00:00",
    "creators": [
        "test_user_1_"
    ],
    "description": "",
    "effective": null,
    "exclude_from_nav": false,
    "expires": null,
    "id": "test-document",
    "is_folderish": false,
    "language": {
        "title": "English",
        "token": "en"
    },
    "layout": "document_view",
    "lock": {
        "locked": false,
        "stealable": true
    },
    "modified": "1995-07-31T17:30:00+00:00",
    "next_item": {},
    "parent": {
        "@id": "http://localhost:55001/plone/en",
        "@type": "LRF",
        "description": "",
        "review_state": "published",
        "title": "English",
        "type_title": "Language Root Folder"
    },
    "previous_item": {
        "@id": "http://localhost:55001/plone/en/assets",
        "@type": "LIF",
        "description": "",
        "title": "Assets",
        "type_title": "Language Independent Folder"
    },
    "relatedItems": [],
    "review_state": "private",
    "rights": "",
    "subjects": [],
    "table_of_contents": null,
    "text": null,
    "title": "Test document",
    "type_title": "Page",
    "version": "current",
    "versioning_enabled": true,
    "working_copy": null,
    "working_copy_of": null
}

previous

Navigation

next

Portal Actions

Contents
  • Expansion

© 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