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 -j http://nohost/plone -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": {
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/@navigation"
    }
  }, 
  "@id": "http://localhost:55001/plone", 
  "@type": "Plone Site", 
  "id": "plone", 
  "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": {}, 
  "sharing": {
    "@id": "http://localhost:55001/plone/@sharing", 
    "title": "Sharing"
  }
}

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 -j http://nohost/plone/folder -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": {
    "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": null, 
  "contributors": [], 
  "created": "2016-01-21T07:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "description": "This is a folder with two documents", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "folder", 
  "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": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/folder/@sharing", 
    "title": "Sharing"
  }, 
  "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 -j http://nohost/plone/front-page -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": {
    "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": null, 
  "changeNote": "", 
  "contributors": [], 
  "created": "2016-01-21T01:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "description": "Congratulations! You have successfully installed Plone.", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "front-page", 
  "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": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/front-page/@sharing", 
    "title": "Sharing"
  }, 
  "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"
}

News Item:

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 -j http://nohost/plone/newsitem -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": {
    "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": null, 
  "changeNote": "", 
  "contributors": [], 
  "created": "2016-01-21T02:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "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/image", 
    "filename": "image.png", 
    "height": 56, 
    "scales": {
      "icon": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/icon", 
        "height": 8, 
        "width": 32
      }, 
      "large": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/large", 
        "height": 56, 
        "width": 215
      }, 
      "listing": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/listing", 
        "height": 4, 
        "width": 16
      }, 
      "mini": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/mini", 
        "height": 52, 
        "width": 200
      }, 
      "preview": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/preview", 
        "height": 56, 
        "width": 215
      }, 
      "thumb": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/thumb", 
        "height": 33, 
        "width": 128
      }, 
      "tile": {
        "download": "http://localhost:55001/plone/newsitem/@@images/image/tile", 
        "height": 16, 
        "width": 64
      }
    }, 
    "size": 1185, 
    "width": 215
  }, 
  "image_caption": "This is an image caption.", 
  "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": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/newsitem/@sharing", 
    "title": "Sharing"
  }, 
  "subjects": [], 
  "text": {
    "content-type": "text/plain", 
    "data": "<p>Lorem ipsum</p>", 
    "encoding": "utf-8"
  }, 
  "title": "My News Item", 
  "version": "current"
}

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 -j http://nohost/plone/event -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": {
    "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": null, 
  "attendees": [], 
  "changeNote": "", 
  "contact_email": null, 
  "contact_name": null, 
  "contact_phone": null, 
  "contributors": [], 
  "created": "2016-01-21T03:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "description": "This is an event", 
  "effective": null, 
  "end": null, 
  "event_url": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "event", 
  "language": "", 
  "layout": "event_view", 
  "location": null, 
  "modified": "2016-01-21T03:24:11+00:00", 
  "open_end": null, 
  "parent": {
    "@id": "http://localhost:55001/plone", 
    "@type": "Plone Site", 
    "description": "", 
    "title": "Plone site"
  }, 
  "recurrence": null, 
  "relatedItems": [], 
  "review_state": "private", 
  "rights": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/event/@sharing", 
    "title": "Sharing"
  }, 
  "start": null, 
  "subjects": [], 
  "sync_uid": null, 
  "text": null, 
  "timezone": null, 
  "title": "Event", 
  "version": "current", 
  "whole_day": null
}

Image:

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 -j http://nohost/plone/image -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": {
    "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": null, 
  "contributors": [], 
  "created": "2016-01-21T06:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "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/image", 
    "filename": "image.png", 
    "height": 56, 
    "scales": {
      "icon": {
        "download": "http://localhost:55001/plone/image/@@images/image/icon", 
        "height": 8, 
        "width": 32
      }, 
      "large": {
        "download": "http://localhost:55001/plone/image/@@images/image/large", 
        "height": 56, 
        "width": 215
      }, 
      "listing": {
        "download": "http://localhost:55001/plone/image/@@images/image/listing", 
        "height": 4, 
        "width": 16
      }, 
      "mini": {
        "download": "http://localhost:55001/plone/image/@@images/image/mini", 
        "height": 52, 
        "width": 200
      }, 
      "preview": {
        "download": "http://localhost:55001/plone/image/@@images/image/preview", 
        "height": 56, 
        "width": 215
      }, 
      "thumb": {
        "download": "http://localhost:55001/plone/image/@@images/image/thumb", 
        "height": 33, 
        "width": 128
      }, 
      "tile": {
        "download": "http://localhost:55001/plone/image/@@images/image/tile", 
        "height": 16, 
        "width": 64
      }
    }, 
    "size": 1185, 
    "width": 215
  }, 
  "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": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/image/@sharing", 
    "title": "Sharing"
  }, 
  "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 -j http://nohost/plone/file -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": {
    "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": null, 
  "contributors": [], 
  "created": "2016-01-21T05:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "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", 
  "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": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/file/@sharing", 
    "title": "Sharing"
  }, 
  "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 -j http://nohost/plone/collection -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": {
    "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": null, 
  "contributors": [], 
  "created": "2016-01-21T08:14:48+00:00", 
  "creators": [
    "test_user_1_", 
    "admin"
  ], 
  "customViewFields": [], 
  "description": "This is a collection with two documents", 
  "effective": null, 
  "exclude_from_nav": false, 
  "expires": null, 
  "id": "collection", 
  "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": "", 
  "sharing": {
    "@id": "http://localhost:55001/plone/collection/@sharing", 
    "title": "Sharing"
  }, 
  "sort_on": null, 
  "sort_reversed": null, 
  "subjects": [], 
  "text": null, 
  "title": "My Collection", 
  "version": "current"
}