Plone Content

How to get all standard Plone content representations. The syntax is given in various tools, click on ‘curl’, ‘http-request’ or ‘python-requests’ to see examples.

Note

For folderish types, collections or search results, the results will be batched if the size of the resultset exceeds the batch size. See Batching for more details on how to work with batched results.

Plone Portal Root:

http

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

curl

curl -i http://nohost/plone -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/@navigation"
    }
  }, 
  "@id": "http://localhost:55001/plone", 
  "@type": "Plone Site", 
  "description": "", 
  "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"
    }
  ], 
  "items_total": 1, 
  "parent": {}, 
  "tiles": {}, 
  "tiles_layout": {}, 
  "title": "Plone site"
}

Plone Folder:

http

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

curl

curl -i http://nohost/plone/folder -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/folder', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/folder/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/folder/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/folder/@navigation"
    }, 
    "workflow": {
      "@id": "http://localhost:55001/plone/folder/@workflow"
    }
  }, 
  "@id": "http://localhost:55001/plone/folder", 
  "@type": "Folder", 
  "UID": "SomeUUID000000000000000000000002", 
  "allow_discussion": false, 
  "contributors": [], 
  "created": "2016-01-21T07:14:48+00:00", 
  "creators": [
    "test_user_1_"
  ], 
  "description": "This is a folder with two documents", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "folder", 
  "is_folderish": true, 
  "items": [
    {
      "@id": "http://localhost:55001/plone/folder/doc1", 
      "@type": "Document", 
      "description": "", 
      "review_state": "private", 
      "title": "A document within a folder"
    }, 
    {
      "@id": "http://localhost:55001/plone/folder/doc2", 
      "@type": "Document", 
      "description": "", 
      "review_state": "private", 
      "title": "A document within a folder"
    }
  ], 
  "items_total": 2, 
  "language": "", 
  "layout": "listing_view", 
  "modified": "2016-01-21T07:24:11+00:00", 
  "nextPreviousEnabled": false, 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "relatedItems": [], 
  "review_state": "private", 
  "rights": "", 
  "subjects": [], 
  "title": "My Folder", 
  "version": "current"
}

Plone Document:

http

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

curl

curl -i http://nohost/plone/front-page -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/front-page', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/front-page/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/front-page/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/front-page/@navigation"
    }, 
    "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": "2016-01-21T01:14:48+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", 
  "modified": "2016-01-21T01:24:11+00:00", 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "relatedItems": [], 
  "review_state": "private", 
  "rights": "", 
  "subjects": [], 
  "table_of_contents": null, 
  "text": {
    "content-type": "text/plain", 
    "data": "<p>If you'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", 
  "version": "current", 
  "versioning_enabled": true
}

News Item:

Note

Here we show uuid1 as an example uid for all image scales because this documentation is autogenerated by the tests. When running in a real application, these uuid1 values will be exchanged by proper uuid4 values.

http

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

curl

curl -i http://nohost/plone/newsitem -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/newsitem', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/newsitem/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/newsitem/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/newsitem/@navigation"
    }, 
    "workflow": {
      "@id": "http://localhost:55001/plone/newsitem/@workflow"
    }
  }, 
  "@id": "http://localhost:55001/plone/newsitem", 
  "@type": "News Item", 
  "UID": "SomeUUID000000000000000000000002", 
  "allow_discussion": false, 
  "changeNote": "", 
  "contributors": [], 
  "created": "2016-01-21T02:14:48+00:00", 
  "creators": [
    "test_user_1_"
  ], 
  "description": "This is a news item", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "newsitem", 
  "image": {
    "content-type": "image/png", 
    "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
    "filename": "image.png", 
    "height": 56, 
    "scales": {
      "icon": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 8, 
        "width": 32
      }, 
      "large": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 56, 
        "width": 215
      }, 
      "listing": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 4, 
        "width": 16
      }, 
      "mini": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 52, 
        "width": 200
      }, 
      "preview": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 56, 
        "width": 215
      }, 
      "thumb": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 33, 
        "width": 128
      }, 
      "tile": {
        "download": "http://localhost:55001/plone/newsitem/@@images/uuid1.png", 
        "height": 16, 
        "width": 64
      }
    }, 
    "size": 1185, 
    "width": 215
  }, 
  "image_caption": "This is an image caption.", 
  "is_folderish": false, 
  "language": "", 
  "layout": "newsitem_view", 
  "modified": "2016-01-21T02:24:11+00:00", 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "relatedItems": [], 
  "review_state": "private", 
  "rights": "", 
  "subjects": [], 
  "text": {
    "content-type": "text/plain", 
    "data": "<p>Lorem ipsum</p>", 
    "encoding": "utf-8"
  }, 
  "title": "My News Item", 
  "version": "current", 
  "versioning_enabled": true
}

Event:

http

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

curl

curl -i http://nohost/plone/event -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/event', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/event/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/event/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/event/@navigation"
    }, 
    "workflow": {
      "@id": "http://localhost:55001/plone/event/@workflow"
    }
  }, 
  "@id": "http://localhost:55001/plone/event", 
  "@type": "Event", 
  "UID": "SomeUUID000000000000000000000002", 
  "allow_discussion": false, 
  "attendees": [], 
  "changeNote": "", 
  "contact_email": null, 
  "contact_name": null, 
  "contact_phone": null, 
  "contributors": [], 
  "created": "2016-01-21T03:14:48+00:00", 
  "creators": [
    "test_user_1_"
  ], 
  "description": "This is an event", 
  "effective": null, 
  "end": "2013-01-01T12:00:00", 
  "event_url": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "event", 
  "is_folderish": false, 
  "language": "", 
  "layout": "event_view", 
  "location": null, 
  "modified": "2016-01-21T03:24:11+00:00", 
  "open_end": false, 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "recurrence": null, 
  "relatedItems": [], 
  "review_state": "private", 
  "rights": "", 
  "start": "2013-01-01T10:00:00", 
  "subjects": [], 
  "sync_uid": null, 
  "text": null, 
  "title": "Event", 
  "version": "current", 
  "versioning_enabled": true, 
  "whole_day": false
}

Image:

Note

Here we show uuid1 as an example uid for all image scales because this documentation is autogenerated by the tests. When running in a real application, these uuid1 values will be exchanged by proper uuid4 values.

http

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

curl

curl -i http://nohost/plone/image -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/image', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/image/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/image/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/image/@navigation"
    }, 
    "workflow": {
      "@id": "http://localhost:55001/plone/image/@workflow"
    }
  }, 
  "@id": "http://localhost:55001/plone/image", 
  "@type": "Image", 
  "UID": "SomeUUID000000000000000000000002", 
  "allow_discussion": false, 
  "contributors": [], 
  "created": "2016-01-21T06:14:48+00:00", 
  "creators": [
    "test_user_1_"
  ], 
  "description": "This is an image", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "image", 
  "image": {
    "content-type": "image/png", 
    "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
    "filename": "image.png", 
    "height": 56, 
    "scales": {
      "icon": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 8, 
        "width": 32
      }, 
      "large": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 56, 
        "width": 215
      }, 
      "listing": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 4, 
        "width": 16
      }, 
      "mini": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 52, 
        "width": 200
      }, 
      "preview": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 56, 
        "width": 215
      }, 
      "thumb": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 33, 
        "width": 128
      }, 
      "tile": {
        "download": "http://localhost:55001/plone/image/@@images/uuid1.png", 
        "height": 16, 
        "width": 64
      }
    }, 
    "size": 1185, 
    "width": 215
  }, 
  "is_folderish": false, 
  "language": "", 
  "layout": "image_view", 
  "modified": "2016-01-21T06:24:11+00:00", 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "relatedItems": [], 
  "review_state": null, 
  "rights": "", 
  "subjects": [], 
  "title": "My Image", 
  "version": "current"
}

File:

http

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

curl

curl -i http://nohost/plone/file -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/file', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/file/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/file/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/file/@navigation"
    }, 
    "workflow": {
      "@id": "http://localhost:55001/plone/file/@workflow"
    }
  }, 
  "@id": "http://localhost:55001/plone/file", 
  "@type": "File", 
  "UID": "SomeUUID000000000000000000000002", 
  "allow_discussion": false, 
  "contributors": [], 
  "created": "2016-01-21T05:14:48+00:00", 
  "creators": [
    "test_user_1_"
  ], 
  "description": "This is a file", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "file": {
    "content-type": "application/pdf", 
    "download": "http://localhost:55001/plone/file/@@download/file", 
    "filename": "file.pdf", 
    "size": 74429
  }, 
  "id": "file", 
  "is_folderish": false, 
  "language": "", 
  "layout": "file_view", 
  "modified": "2016-01-21T05:24:11+00:00", 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "relatedItems": [], 
  "review_state": null, 
  "rights": "", 
  "subjects": [], 
  "title": "My File", 
  "version": "current"
}

Collection:

http

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

curl

curl -i http://nohost/plone/collection -H 'Accept: application/json' --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/collection', headers={
    'Accept': 'application/json',
}, auth=('admin', 'secret'))
HTTP/1.1 200 OK
Content-Type: application/json

{
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/collection/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/collection/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/collection/@navigation"
    }, 
    "workflow": {
      "@id": "http://localhost:55001/plone/collection/@workflow"
    }
  }, 
  "@id": "http://localhost:55001/plone/collection", 
  "@type": "Collection", 
  "UID": "SomeUUID000000000000000000000002", 
  "allow_discussion": false, 
  "contributors": [], 
  "created": "2016-01-21T08:14:48+00:00", 
  "creators": [
    "test_user_1_"
  ], 
  "customViewFields": [
    {
      "title": "Title", 
      "token": "Title"
    }, 
    {
      "title": "Creator", 
      "token": "Creator"
    }, 
    {
      "title": "Type", 
      "token": "Type"
    }, 
    {
      "title": "ModificationDate", 
      "token": "ModificationDate"
    }
  ], 
  "description": "This is a collection with two documents", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "collection", 
  "is_folderish": false, 
  "item_count": 30, 
  "items": [
    {
      "@id": "http://localhost:55001/plone/front-page", 
      "@type": "Document", 
      "description": "Congratulations! You have successfully installed Plone.", 
      "review_state": "private", 
      "title": "Welcome to Plone"
    }, 
    {
      "@id": "http://localhost:55001/plone/doc1", 
      "@type": "Document", 
      "description": "", 
      "review_state": "private", 
      "title": "Document 1"
    }, 
    {
      "@id": "http://localhost:55001/plone/doc2", 
      "@type": "Document", 
      "description": "", 
      "review_state": "private", 
      "title": "Document 2"
    }
  ], 
  "items_total": 3, 
  "language": "", 
  "layout": "listing_view", 
  "limit": 1000, 
  "modified": "2016-01-21T08:24:11+00:00", 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "query": [
    {
      "i": "portal_type", 
      "o": "plone.app.querystring.operation.string.is", 
      "v": "Document"
    }
  ], 
  "relatedItems": [], 
  "review_state": "private", 
  "rights": "", 
  "sort_on": null, 
  "sort_reversed": null, 
  "subjects": [], 
  "text": null, 
  "title": "My Collection", 
  "version": "current"
}