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 :doc:`./batching` for more details on how to work with batched
        results.


Plone Portal Root:
------------------

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/siteroot.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/siteroot.resp
   :language: http


Plone Folder:
-------------

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/folder.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/folder.resp
   :language: http


Plone Document:
---------------

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/document.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/document.resp
   :language: http


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:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/newsitem.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/newsitem.resp
   :language: http


Event:
------

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/event.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/event.resp
   :language: http


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:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/image.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/image.resp
   :language: http


File:
-----

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/file.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/file.resp
   :language: http


Link:
-----

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/link.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/link.resp
   :language: http


Collection:
-----------

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/collection.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/collection.resp
   :language: http


You can also get all the data of each of the items of a collection, appending the `?fullobjects`
parameter to the query:

..  http:example:: curl httpie python-requests
    :request: ../../src/plone/restapi/tests/http-examples/collection_fullobjects.req

.. literalinclude:: ../../src/plone/restapi/tests/http-examples/collection_fullobjects.resp
   :language: http
