Components¶
Warning
The @components endpoint is deprecated and will be removed in plone.restapi 1.0b1. Breadcrumbs and Navigation are now top-level endpoints.
How to get pages components (i.e. everything but the main content), like breadcrumbs, navigations, actions, etc.
Breadcrumbs¶
Getting the breadcrumbs for the current page:
GET /plone/front-page/@components/breadcrumbs HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
curl -i http://nohost/plone/front-page/@components/breadcrumbs -H "Accept: application/json" --user admin:secret
http -j http://nohost/plone/front-page/@components/breadcrumbs -a admin:secret
requests.get('http://nohost/plone/front-page/@components/breadcrumbs', 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/@components/breadcrumbs",
"items": [
{
"title": "Welcome to Plone",
"url": "http://localhost:55001/plone/front-page"
}
]
}
]