├── .coveragerc ├── .editorconfig ├── .flake8 ├── .github ├── dependabot.yml └── workflows │ ├── meta.yml │ ├── rtd-pr-preview.yml │ ├── test-matrix.yml │ └── tests.yml ├── .gitignore ├── .landscape.yml ├── .meta.toml ├── .pre-commit-config.yaml ├── .python-version ├── .readthedocs.yaml ├── .vale.ini ├── CHANGES.md ├── CODEOWNERS ├── CONTRIBUTORS.md ├── MANIFEST.in ├── Makefile ├── README.md ├── constraints-5.2.txt ├── constraints.txt ├── docs ├── source │ ├── _json │ │ ├── vocabularies_get_filtered.req │ │ └── vocabularies_get_filtered.resp │ ├── _static │ │ ├── favicon.ico │ │ ├── img │ │ │ ├── postman_basic_auth.png │ │ │ ├── postman_headers.png │ │ │ ├── postman_request.png │ │ │ ├── postman_response.png │ │ │ └── postman_retain_headers.png │ │ ├── logo.svg │ │ ├── sphinxcontrib-httpexample.css │ │ └── sphinxcontrib-httpexample.js │ ├── _templates │ │ └── layout.html │ ├── conf.py │ ├── contributing │ │ ├── conventions.md │ │ └── index.md │ ├── endpoints │ │ ├── actions.md │ │ ├── addons.md │ │ ├── aliases.md │ │ ├── breadcrumbs.md │ │ ├── comments.md │ │ ├── content-rules.md │ │ ├── content-types.md │ │ ├── contextnavigation.md │ │ ├── controlpanels.md │ │ ├── copymove.md │ │ ├── database.md │ │ ├── email-notification.md │ │ ├── email-send.md │ │ ├── groups.md │ │ ├── history.md │ │ ├── index.md │ │ ├── inherit.md │ │ ├── linkintegrity.md │ │ ├── locking.md │ │ ├── login.md │ │ ├── navigation.md │ │ ├── navroot.md │ │ ├── portrait.md │ │ ├── principals.md │ │ ├── querystring.md │ │ ├── querystringsearch.md │ │ ├── registry.md │ │ ├── relations.md │ │ ├── roles.md │ │ ├── searching.md │ │ ├── sharing.md │ │ ├── site.md │ │ ├── system.md │ │ ├── transactions.md │ │ ├── translations.md │ │ ├── tusupload.md │ │ ├── types.md │ │ ├── upgrade.md │ │ ├── users.md │ │ ├── userschema.md │ │ ├── vocabularies.md │ │ ├── workflow.md │ │ └── workingcopy.md │ ├── glossary.md │ ├── http-status-codes.md │ ├── index.md │ ├── introduction.md │ ├── readthedocs-requirements.txt │ ├── temp.json │ ├── upgrade-guide.md │ └── usage │ │ ├── authentication.md │ │ ├── batching.md │ │ ├── blocks.md │ │ ├── content.md │ │ ├── customization.md │ │ ├── expansion.md │ │ ├── exploring.md │ │ ├── i18n.md │ │ ├── index.md │ │ ├── serialization.md │ │ └── types-schema.md └── styles │ └── config │ └── vocabularies │ ├── Base │ ├── accept.txt │ └── reject.txt │ └── Plone │ ├── accept.txt │ └── reject.txt ├── ideas ├── actions.rst ├── hydra-operations.rst ├── hydra.rst ├── item.rst ├── plog2015.rst ├── plone-conference-2014-open-space.rst ├── toolbar.rst └── workflow.rst ├── instance.yaml ├── mx.ini ├── news ├── .changelog_template.jinja └── .gitkeep ├── performance ├── Jenkinsfile ├── convert.py ├── images.py ├── performance.jmx ├── plone-5.2-py3-imac-pro-20191122 │ ├── README.md │ ├── jmeter-anonymous-read.png │ ├── jmeter-authenticated-read.png │ └── jmeter-authenticated-write.png ├── plone-5.2.1-py3-imac-pro-20200401 │ ├── jmeter-anonymous-read.png │ ├── jmeter-authenticated-read.png │ └── jmeter-authenticated-write.png ├── plone-5.2.1-py3-imac-pro-20200404 │ ├── jmeter-anonymous-read-namedfile-5.3.1.png │ ├── jmeter-anonymous-read.png │ ├── jmeter-authenticated-read-namedfile-5.3.1.png │ ├── jmeter-authenticated-read.png │ ├── jmeter-authenticated-write-namedfile-5.2.1.png │ ├── jmeter-authenticated-write-namedfile-5.3.0.png │ ├── jmeter-authenticated-write-namedfile-5.3.1.png │ └── jmeter-authenticated-write.png ├── plone-5.2.5-py3.8-imac-pro-20211022 │ ├── jmeter-anonymous-read.png │ ├── jmeter-authenticated-read.png │ └── jmeter-authenticated-write.png ├── plone-5.2.x-performance.cfg ├── plone-6.0.x-performance.cfg ├── querystring-search.jmx ├── querystring-search.py ├── volto-page-with-images-p.namedfile-5.2.1.png ├── volto-page-with-images-p.namedfile-5.3.1.png ├── volto-page-with-news-items-p.namedfile-5.2.1.png ├── volto-page-with-news-items-p.namedfile-5.3.1.png ├── volto.jmx └── werkzeugdebugger.ini.in ├── pyproject.toml ├── requirements-docs.txt ├── requirements.txt ├── setup.py ├── src └── plone │ ├── __init__.py │ └── restapi │ ├── __init__.py │ ├── batching.py │ ├── bbb.py │ ├── behaviors.py │ ├── blocks.py │ ├── blocks_linkintegrity.py │ ├── cache │ ├── __init__.py │ ├── configure.zcml │ └── paths.py │ ├── configure.zcml │ ├── controlpanels │ ├── __init__.py │ ├── interfaces.py │ ├── registry.py │ ├── rules.py │ └── types.py │ ├── demo │ ├── __init__.py │ ├── angular.pt │ ├── configure.zcml │ └── demo.py │ ├── deserializer │ ├── __init__.py │ ├── blocks.py │ ├── configure.zcml │ ├── controlpanels │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── types.py │ ├── dxcontent.py │ ├── dxfields.py │ ├── local_roles.py │ ├── mixins.py │ ├── relationfield.py │ ├── site.py │ └── utils.py │ ├── exceptions.py │ ├── imaging.py │ ├── indexers.py │ ├── indexers.zcml │ ├── interfaces.py │ ├── locales │ ├── de │ │ └── LC_MESSAGES │ │ │ └── plone.restapi.po │ ├── es │ │ └── LC_MESSAGES │ │ │ └── plone.restapi.po │ ├── fr │ │ └── LC_MESSAGES │ │ │ └── plone.restapi.po │ ├── plone.restapi.pot │ ├── pt_BR │ │ └── LC_MESSAGES │ │ │ └── plone.restapi.po │ └── update.py │ ├── meta.zcml │ ├── pas │ ├── __init__.py │ ├── add_plugin.zpt │ ├── config.zpt │ └── plugin.py │ ├── patches.py │ ├── permissions.py │ ├── permissions.zcml │ ├── profiles │ ├── blocks │ │ ├── metadata.xml │ │ ├── types.xml │ │ └── types │ │ │ └── Document.xml │ ├── default │ │ ├── browserlayer.xml │ │ ├── metadata.xml │ │ └── rolemap.xml │ ├── performance │ │ ├── import_steps.xml │ │ ├── metadata.xml │ │ ├── plone.restapi_performance_testing.txt │ │ └── registry.xml │ ├── testing-workflows │ │ ├── workflows.xml │ │ └── workflows │ │ │ └── restriction_workflow │ │ │ └── definition.xml │ ├── testing │ │ ├── catalog.xml │ │ ├── componentregistry.xml │ │ ├── types.xml │ │ └── types │ │ │ ├── ATTestDocument.xml │ │ │ ├── ATTestFolder.xml │ │ │ └── DXTestDocument.xml │ └── uninstall │ │ └── browserlayer.xml │ ├── search │ ├── __init__.py │ ├── configure.zcml │ ├── date_recurring_index.py │ ├── handler.py │ ├── query.py │ └── utils.py │ ├── serializer │ ├── __init__.py │ ├── blocks.py │ ├── catalog.py │ ├── collection.py │ ├── configure.zcml │ ├── controlpanels │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── rules.py │ │ └── types.py │ ├── converters.py │ ├── discussion.py │ ├── dxcontent.py │ ├── dxfields.py │ ├── expansion.py │ ├── group.py │ ├── local_roles.py │ ├── nextprev.py │ ├── registry.py │ ├── relationfield.py │ ├── schema.py │ ├── site.py │ ├── summary.py │ ├── user.py │ ├── utils.py │ ├── vocabularies.py │ └── working_copy.py │ ├── services │ ├── __init__.py │ ├── actions │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── addons │ │ ├── __init__.py │ │ ├── addons.py │ │ ├── configure.zcml │ │ ├── get.py │ │ └── post.py │ ├── aliases │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ └── get.py │ ├── auth │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── get.py │ │ ├── login.py │ │ ├── logout.py │ │ └── renew.py │ ├── breadcrumbs │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── configure.zcml │ ├── content │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ ├── sharing.py │ │ ├── tus.py │ │ ├── update.py │ │ └── utils.py │ ├── contextnavigation │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── controlpanels │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ └── update.py │ ├── copymove │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── copymove.py │ ├── database │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── discussion │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── conversation.py │ │ └── utils.py │ ├── email_notification │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── post.py │ ├── email_send │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── post.py │ ├── groups │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ └── update.py │ ├── history │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── get.py │ │ └── patch.py │ ├── inherit │ │ ├── configure.zcml │ │ └── get.py │ ├── linkintegrity │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── locking │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ └── update.py │ ├── multilingual │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── locator.py │ │ └── pam.py │ ├── navigation │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── navroot │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── principals │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── querysources │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── querystring │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── querystringsearch │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── registry │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── get.py │ │ └── update.py │ ├── relations │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ └── get.py │ ├── roles │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── rules │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ └── update.py │ ├── search │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── site │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── sources │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── system │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── transactions │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── get.py │ │ └── patch.py │ ├── types │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ ├── put.py │ │ └── update.py │ ├── upgrade │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── get.py │ │ └── post.py │ ├── users │ │ ├── __init__.py │ │ ├── add.py │ │ ├── configure.zcml │ │ ├── delete.py │ │ ├── get.py │ │ └── update.py │ ├── userschema │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── user.py │ ├── vocabularies │ │ ├── __init__.py │ │ ├── configure.zcml │ │ └── get.py │ ├── workflow │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── info.py │ │ ├── transition.py │ │ └── utils.py │ └── workingcopy │ │ ├── __init__.py │ │ ├── configure.zcml │ │ ├── create.py │ │ ├── delete.py │ │ ├── get.py │ │ └── update.py │ ├── setuphandlers.py │ ├── testing.py │ ├── testing.zcml │ ├── tests │ ├── 1024x768.gif │ ├── __init__.py │ ├── dxtypes.py │ ├── file.pdf │ ├── helpers.py │ ├── http-examples │ │ ├── 404_not_found.req │ │ ├── 404_not_found.resp │ │ ├── actions_get.req │ │ ├── actions_get.resp │ │ ├── addons_get.req │ │ ├── addons_get.resp │ │ ├── addons_get_list.req │ │ ├── addons_get_list.resp │ │ ├── addons_install.req │ │ ├── addons_install.resp │ │ ├── addons_install_profile.req │ │ ├── addons_install_profile.resp │ │ ├── addons_uninstall.req │ │ ├── addons_uninstall.resp │ │ ├── addons_upgrade.req │ │ ├── addons_upgrade.resp │ │ ├── aliases_add.req │ │ ├── aliases_add.resp │ │ ├── aliases_delete.req │ │ ├── aliases_delete.resp │ │ ├── aliases_get.req │ │ ├── aliases_get.resp │ │ ├── aliases_root_add.req │ │ ├── aliases_root_add.resp │ │ ├── aliases_root_add_csv_format.req │ │ ├── aliases_root_add_csv_format.resp │ │ ├── aliases_root_delete.req │ │ ├── aliases_root_delete.resp │ │ ├── aliases_root_filter.req │ │ ├── aliases_root_filter.resp │ │ ├── aliases_root_get.req │ │ ├── aliases_root_get.resp │ │ ├── aliases_root_get_csv_format.req │ │ ├── aliases_root_get_csv_format.resp │ │ ├── batching.req │ │ ├── batching.resp │ │ ├── breadcrumbs.req │ │ ├── breadcrumbs.resp │ │ ├── collection.req │ │ ├── collection.resp │ │ ├── collection_fullobjects.req │ │ ├── collection_fullobjects.resp │ │ ├── comments_add_root.req │ │ ├── comments_add_root.resp │ │ ├── comments_add_sub.req │ │ ├── comments_add_sub.resp │ │ ├── comments_delete.req │ │ ├── comments_delete.resp │ │ ├── comments_get.req │ │ ├── comments_get.resp │ │ ├── comments_update.req │ │ ├── comments_update.resp │ │ ├── component_breadcrumbs.req │ │ ├── component_breadcrumbs.resp │ │ ├── component_navigation.req │ │ ├── component_navigation.resp │ │ ├── content_delete.req │ │ ├── content_delete.resp │ │ ├── content_get.req │ │ ├── content_get.resp │ │ ├── content_get_folder.req │ │ ├── content_get_folder.resp │ │ ├── content_patch.req │ │ ├── content_patch.resp │ │ ├── content_patch_representation.req │ │ ├── content_patch_representation.resp │ │ ├── content_post.req │ │ ├── content_post.resp │ │ ├── content_reorder.req │ │ ├── content_resort.req │ │ ├── contextnavigation.req │ │ ├── contextnavigation.resp │ │ ├── controlpanels_delete_action_condition.req │ │ ├── controlpanels_delete_action_condition.resp │ │ ├── controlpanels_delete_dexterity_item.req │ │ ├── controlpanels_delete_dexterity_item.resp │ │ ├── controlpanels_delete_rule.req │ │ ├── controlpanels_delete_rule.resp │ │ ├── controlpanels_delete_rule_condition.req │ │ ├── controlpanels_delete_rule_condition.resp │ │ ├── controlpanels_get.req │ │ ├── controlpanels_get.resp │ │ ├── controlpanels_get_contentrules.req │ │ ├── controlpanels_get_contentrules.resp │ │ ├── controlpanels_get_dexterity.req │ │ ├── controlpanels_get_dexterity.resp │ │ ├── controlpanels_get_dexterity_item.req │ │ ├── controlpanels_get_dexterity_item.resp │ │ ├── controlpanels_get_item.req │ │ ├── controlpanels_get_item.resp │ │ ├── controlpanels_get_rule.req │ │ ├── controlpanels_get_rule.resp │ │ ├── controlpanels_get_rule_action_copy.req │ │ ├── controlpanels_get_rule_action_copy.resp │ │ ├── controlpanels_get_rule_action_logger.req │ │ ├── controlpanels_get_rule_action_logger.resp │ │ ├── controlpanels_get_rule_action_mail.req │ │ ├── controlpanels_get_rule_action_mail.resp │ │ ├── controlpanels_get_rule_action_move.req │ │ ├── controlpanels_get_rule_action_move.resp │ │ ├── controlpanels_get_rule_action_notify.req │ │ ├── controlpanels_get_rule_action_notify.resp │ │ ├── controlpanels_get_rule_action_transition.req │ │ ├── controlpanels_get_rule_action_transition.resp │ │ ├── controlpanels_get_rule_action_versioning.req │ │ ├── controlpanels_get_rule_action_versioning.resp │ │ ├── controlpanels_get_rule_condition_fileextension.req │ │ ├── controlpanels_get_rule_condition_fileextension.resp │ │ ├── controlpanels_get_rule_condition_group.req │ │ ├── controlpanels_get_rule_condition_group.resp │ │ ├── controlpanels_get_rule_condition_portaltype.req │ │ ├── controlpanels_get_rule_condition_portaltype.resp │ │ ├── controlpanels_get_rule_condition_role.req │ │ ├── controlpanels_get_rule_condition_role.resp │ │ ├── controlpanels_get_rule_condition_tales.req │ │ ├── controlpanels_get_rule_condition_tales.resp │ │ ├── controlpanels_get_rule_condition_workflowstate.req │ │ ├── controlpanels_get_rule_condition_workflowstate.resp │ │ ├── controlpanels_patch.req │ │ ├── controlpanels_patch.resp │ │ ├── controlpanels_patch_dexterity_item.req │ │ ├── controlpanels_patch_dexterity_item.resp │ │ ├── controlpanels_patch_rule.req │ │ ├── controlpanels_patch_rule.resp │ │ ├── controlpanels_patch_rule_action_logger.req │ │ ├── controlpanels_patch_rule_action_logger.resp │ │ ├── controlpanels_patch_rule_action_move_down.req │ │ ├── controlpanels_patch_rule_action_move_down.resp │ │ ├── controlpanels_patch_rule_action_move_up.req │ │ ├── controlpanels_patch_rule_action_move_up.resp │ │ ├── controlpanels_patch_rule_condition_move_down.req │ │ ├── controlpanels_patch_rule_condition_move_down.resp │ │ ├── controlpanels_patch_rule_condition_move_up.req │ │ ├── controlpanels_patch_rule_condition_move_up.resp │ │ ├── controlpanels_patch_rule_condition_portaltype.req │ │ ├── controlpanels_patch_rule_condition_portaltype.resp │ │ ├── controlpanels_post_dexterity_item.req │ │ ├── controlpanels_post_dexterity_item.resp │ │ ├── controlpanels_post_rule.req │ │ ├── controlpanels_post_rule.resp │ │ ├── controlpanels_post_rule_action_copy.req │ │ ├── controlpanels_post_rule_action_copy.resp │ │ ├── controlpanels_post_rule_action_delete.req │ │ ├── controlpanels_post_rule_action_delete.resp │ │ ├── controlpanels_post_rule_action_logger.req │ │ ├── controlpanels_post_rule_action_logger.resp │ │ ├── controlpanels_post_rule_action_mail.req │ │ ├── controlpanels_post_rule_action_mail.resp │ │ ├── controlpanels_post_rule_action_move.req │ │ ├── controlpanels_post_rule_action_move.resp │ │ ├── controlpanels_post_rule_action_notify.req │ │ ├── controlpanels_post_rule_action_notify.resp │ │ ├── controlpanels_post_rule_action_transition.req │ │ ├── controlpanels_post_rule_action_transition.resp │ │ ├── controlpanels_post_rule_action_versioning.req │ │ ├── controlpanels_post_rule_action_versioning.resp │ │ ├── controlpanels_post_rule_condition_fileextension.req │ │ ├── controlpanels_post_rule_condition_fileextension.resp │ │ ├── controlpanels_post_rule_condition_group.req │ │ ├── controlpanels_post_rule_condition_group.resp │ │ ├── controlpanels_post_rule_condition_portaltype.req │ │ ├── controlpanels_post_rule_condition_portaltype.resp │ │ ├── controlpanels_post_rule_condition_role.req │ │ ├── controlpanels_post_rule_condition_role.resp │ │ ├── controlpanels_post_rule_condition_tales.req │ │ ├── controlpanels_post_rule_condition_tales.resp │ │ ├── controlpanels_post_rule_condition_workflowstate.req │ │ ├── controlpanels_post_rule_condition_workflowstate.resp │ │ ├── conversation_comment_add_root.req │ │ ├── conversation_comment_add_root.resp │ │ ├── conversation_comment_add_sub.req │ │ ├── conversation_comment_add_sub.resp │ │ ├── conversation_comment_delete.req │ │ ├── conversation_comment_delete.resp │ │ ├── conversation_comment_detele.req │ │ ├── conversation_comment_get.req │ │ ├── conversation_comment_update.req │ │ ├── conversation_comment_update.resp │ │ ├── conversation_delete.req │ │ ├── conversation_delete.resp │ │ ├── copy.json │ │ ├── copy.json.req │ │ ├── copy.json.resp │ │ ├── copy.req │ │ ├── copy.resp │ │ ├── copy_multiple.req │ │ ├── copy_multiple.resp │ │ ├── database_get.req │ │ ├── document.req │ │ ├── document.resp │ │ ├── event.req │ │ ├── event.resp │ │ ├── expansion.req │ │ ├── expansion.resp │ │ ├── expansion_expanded.req │ │ ├── expansion_expanded.resp │ │ ├── expansion_expanded_full.req │ │ ├── expansion_expanded_full.resp │ │ ├── external_authentication_links.req │ │ ├── external_authentication_links.resp │ │ ├── file.req │ │ ├── file.resp │ │ ├── folder.req │ │ ├── folder.resp │ │ ├── groups.req │ │ ├── groups.resp │ │ ├── groups_created.req │ │ ├── groups_created.resp │ │ ├── groups_delete.req │ │ ├── groups_delete.resp │ │ ├── groups_filtered_by_groupname.req │ │ ├── groups_filtered_by_groupname.resp │ │ ├── groups_get.req │ │ ├── groups_get.resp │ │ ├── groups_update.req │ │ ├── groups_update.resp │ │ ├── history_get.req │ │ ├── history_get.resp │ │ ├── history_get_versioned.req │ │ ├── history_revert.req │ │ ├── history_revert.resp │ │ ├── image.req │ │ ├── image.resp │ │ ├── inherit.get.req │ │ ├── inherit_expansion.req │ │ ├── inherit_expansion.resp │ │ ├── inherit_get.req │ │ ├── inherit_get.resp │ │ ├── jwt_logged_in.req │ │ ├── jwt_logged_in.resp │ │ ├── jwt_login.req │ │ ├── jwt_login.resp │ │ ├── jwt_login_renew.req │ │ ├── jwt_login_renew.resp │ │ ├── jwt_logout.req │ │ ├── jwt_logout.resp │ │ ├── link.req │ │ ├── link.resp │ │ ├── linkintegrity_get.req │ │ ├── linkintegrity_get.resp │ │ ├── lock.req │ │ ├── lock.resp │ │ ├── lock_get.req │ │ ├── lock_get.resp │ │ ├── lock_nonstealable_timeout.req │ │ ├── lock_nonstealable_timeout.resp │ │ ├── lock_update.req │ │ ├── lock_update.resp │ │ ├── login.req │ │ ├── move.json │ │ ├── move.json.req │ │ ├── move.json.resp │ │ ├── move.req │ │ ├── move.resp │ │ ├── navigation.req │ │ ├── navigation.resp │ │ ├── navigation_tree.req │ │ ├── navigation_tree.resp │ │ ├── navroot_lang_content_get.req │ │ ├── navroot_lang_content_get.resp │ │ ├── navroot_lang_folder_get.req │ │ ├── navroot_lang_folder_get.resp │ │ ├── navroot_site_get.req │ │ ├── navroot_site_get.resp │ │ ├── navroot_standard_site_content_get.req │ │ ├── navroot_standard_site_content_get.resp │ │ ├── navroot_standard_site_content_get_expansion.req │ │ ├── navroot_standard_site_content_get_expansion.resp │ │ ├── navroot_standard_site_get.req │ │ ├── navroot_standard_site_get.resp │ │ ├── navroot_standard_site_get_expansion.req │ │ ├── navroot_standard_site_get_expansion.resp │ │ ├── newsitem.req │ │ ├── newsitem.resp │ │ ├── portrait_self_404_get.resp │ │ ├── portrait_self_get.req │ │ ├── portrait_self_get.resp │ │ ├── portrait_username_get.req │ │ ├── portrait_username_get.resp │ │ ├── principals.req │ │ ├── principals.resp │ │ ├── querysources_get.req │ │ ├── querysources_get.resp │ │ ├── querystring_get.req │ │ ├── querystring_get.resp │ │ ├── querystring_get_contextual.req │ │ ├── querystring_get_contextual.resp │ │ ├── querystringsearch_get.req │ │ ├── querystringsearch_get.resp │ │ ├── querystringsearch_post.req │ │ ├── querystringsearch_post.resp │ │ ├── refresh_lock.req │ │ ├── refresh_lock.resp │ │ ├── registry_get.req │ │ ├── registry_get.resp │ │ ├── registry_get_list.req │ │ ├── registry_get_list.resp │ │ ├── registry_get_list_filtered.req │ │ ├── registry_get_list_filtered.resp │ │ ├── registry_update.req │ │ ├── registry_update.resp │ │ ├── relations_catalog_get_stats.req │ │ ├── relations_catalog_get_stats.resp │ │ ├── relations_del.req │ │ ├── relations_del.resp │ │ ├── relations_del_anonymous.req │ │ ├── relations_del_anonymous.resp │ │ ├── relations_del_combi.req │ │ ├── relations_del_combi.resp │ │ ├── relations_del_failure.req │ │ ├── relations_del_failure.resp │ │ ├── relations_del_path_uid.req │ │ ├── relations_del_path_uid.resp │ │ ├── relations_del_relationname.req │ │ ├── relations_del_relationname.resp │ │ ├── relations_del_source.req │ │ ├── relations_del_source.resp │ │ ├── relations_del_target.req │ │ ├── relations_del_target.resp │ │ ├── relations_get_relationname.req │ │ ├── relations_get_relationname.resp │ │ ├── relations_get_relationname_anonymous.req │ │ ├── relations_get_relationname_anonymous.resp │ │ ├── relations_get_source_and_relation.req │ │ ├── relations_get_source_and_relation.resp │ │ ├── relations_get_source_anonymous.req │ │ ├── relations_get_source_anonymous.resp │ │ ├── relations_get_source_by_path.req │ │ ├── relations_get_source_by_path.resp │ │ ├── relations_get_source_by_uid.req │ │ ├── relations_get_source_by_uid.resp │ │ ├── relations_get_target.req │ │ ├── relations_get_target.resp │ │ ├── relations_post.req │ │ ├── relations_post.resp │ │ ├── relations_post_anonyous.req │ │ ├── relations_post_anonyous.resp │ │ ├── relations_post_failure.req │ │ ├── relations_post_failure.resp │ │ ├── relations_post_with_uid.req │ │ ├── relations_post_with_uid.resp │ │ ├── relations_rebuild.req │ │ ├── relations_rebuild.resp │ │ ├── relations_rebuild_with_flush.req │ │ ├── relations_rebuild_with_flush.resp │ │ ├── roles.req │ │ ├── roles.resp │ │ ├── rules_add.req │ │ ├── rules_add.resp │ │ ├── rules_apply_subfolders.req │ │ ├── rules_apply_subfolders.resp │ │ ├── rules_delete.req │ │ ├── rules_delete.resp │ │ ├── rules_disable.req │ │ ├── rules_disable.resp │ │ ├── rules_disable_apply_subfolders.req │ │ ├── rules_disable_apply_subfolders.resp │ │ ├── rules_enable.req │ │ ├── rules_enable.resp │ │ ├── rules_get.req │ │ ├── rules_get.resp │ │ ├── rules_move_down.req │ │ ├── rules_move_down.resp │ │ ├── rules_move_up.req │ │ ├── rules_move_up.resp │ │ ├── search.req │ │ ├── search.resp │ │ ├── search_fullobjects.req │ │ ├── search_fullobjects.resp │ │ ├── search_metadata_fields.req │ │ ├── search_metadata_fields.resp │ │ ├── search_multiple_paths.req │ │ ├── search_multiple_paths.resp │ │ ├── search_options.req │ │ ├── search_options.resp │ │ ├── search_sort_multiple_indexes.req │ │ ├── search_sort_multiple_indexes.resp │ │ ├── sharing_folder_get.req │ │ ├── sharing_folder_get.resp │ │ ├── sharing_folder_get_include_titles.req │ │ ├── sharing_folder_post.req │ │ ├── sharing_folder_post.resp │ │ ├── sharing_search.req │ │ ├── sharing_search.resp │ │ ├── site_get.req │ │ ├── site_get.resp │ │ ├── site_get_expand_lang_folder.req │ │ ├── site_get_expand_lang_folder.resp │ │ ├── site_get_expand_lang_folder_content.req │ │ ├── site_get_expand_lang_folder_content.resp │ │ ├── site_get_expand_navroot.req │ │ ├── site_get_expand_navroot.resp │ │ ├── siteroot.req │ │ ├── siteroot.resp │ │ ├── sources_get.req │ │ ├── sources_get.resp │ │ ├── system_get.req │ │ ├── transactions_get.req │ │ ├── transactions_get.resp │ │ ├── transactions_revert.req │ │ ├── transactions_revert.resp │ │ ├── translated_messages_addons.req │ │ ├── translated_messages_addons.resp │ │ ├── translated_messages_object_history.req │ │ ├── translated_messages_object_history.resp │ │ ├── translated_messages_object_workflow.req │ │ ├── translated_messages_object_workflow.resp │ │ ├── translated_messages_types.req │ │ ├── translated_messages_types.resp │ │ ├── translated_messages_types_folder.req │ │ ├── translated_messages_types_folder.resp │ │ ├── translation_locator.req │ │ ├── translation_locator.resp │ │ ├── translations_delete.req │ │ ├── translations_delete.resp │ │ ├── translations_expand_get.req │ │ ├── translations_expand_get.resp │ │ ├── translations_get.req │ │ ├── translations_get.resp │ │ ├── translations_link_on_post.req │ │ ├── translations_link_on_post.resp │ │ ├── translations_post.req │ │ ├── translations_post.resp │ │ ├── translations_post_by_id.req │ │ ├── translations_post_by_id.resp │ │ ├── translations_post_by_uid.req │ │ ├── translations_post_by_uid.resp │ │ ├── translations_unexpanded_get.req │ │ ├── translations_unexpanded_get.resp │ │ ├── tusreplace_patch.req │ │ ├── tusreplace_patch.resp │ │ ├── tusreplace_post.req │ │ ├── tusreplace_post.resp │ │ ├── tusupload_head.req │ │ ├── tusupload_head.resp │ │ ├── tusupload_options.req │ │ ├── tusupload_options.resp │ │ ├── tusupload_patch.req │ │ ├── tusupload_patch.resp │ │ ├── tusupload_patch_finalized.req │ │ ├── tusupload_patch_finalized.resp │ │ ├── tusupload_post.req │ │ ├── tusupload_post.resp │ │ ├── types.req │ │ ├── types.resp │ │ ├── types_document.req │ │ ├── types_document.resp │ │ ├── types_document_delete_field.req │ │ ├── types_document_delete_field.resp │ │ ├── types_document_delete_fieldset.req │ │ ├── types_document_delete_fieldset.resp │ │ ├── types_document_delete_fieldset_error.req │ │ ├── types_document_delete_fieldset_error.resp │ │ ├── types_document_get_field.req │ │ ├── types_document_get_field.resp │ │ ├── types_document_get_fieldset.req │ │ ├── types_document_get_fieldset.resp │ │ ├── types_document_patch.req │ │ ├── types_document_patch.resp │ │ ├── types_document_patch_field.req │ │ ├── types_document_patch_field.resp │ │ ├── types_document_patch_fieldset.req │ │ ├── types_document_patch_fieldset.resp │ │ ├── types_document_patch_fieldsets.req │ │ ├── types_document_patch_fieldsets.resp │ │ ├── types_document_patch_properites.req │ │ ├── types_document_patch_properites.resp │ │ ├── types_document_post_field.req │ │ ├── types_document_post_field.resp │ │ ├── types_document_post_fieldset.req │ │ ├── types_document_post_fieldset.resp │ │ ├── types_document_put.req │ │ ├── types_document_put.resp │ │ ├── unlock.req │ │ ├── unlock.resp │ │ ├── unlock_force.req │ │ ├── unlock_force.resp │ │ ├── upgrade_get.req │ │ ├── upgrade_get.resp │ │ ├── upgrade_post.req │ │ ├── upgrade_post.resp │ │ ├── upgrade_post_dry_run.req │ │ ├── upgrade_post_dry_run.resp │ │ ├── users.req │ │ ├── users.resp │ │ ├── users_add.req │ │ ├── users_add.resp │ │ ├── users_anonymous.req │ │ ├── users_anonymous.resp │ │ ├── users_anonymous_get.req │ │ ├── users_anonymous_get.resp │ │ ├── users_authorized_get.req │ │ ├── users_authorized_get.resp │ │ ├── users_created.req │ │ ├── users_created.resp │ │ ├── users_delete.req │ │ ├── users_delete.resp │ │ ├── users_delete_no_localroles.req │ │ ├── users_delete_no_localroles.resp │ │ ├── users_delete_no_memberareas.req │ │ ├── users_delete_no_memberareas.resp │ │ ├── users_filtered_by_groups.req │ │ ├── users_filtered_by_groups.resp │ │ ├── users_filtered_by_username.req │ │ ├── users_filtered_by_username.resp │ │ ├── users_get.req │ │ ├── users_get.resp │ │ ├── users_reset.req │ │ ├── users_searched.req │ │ ├── users_searched.resp │ │ ├── users_unauthorized.req │ │ ├── users_unauthorized.resp │ │ ├── users_unauthorized_get.req │ │ ├── users_unauthorized_get.resp │ │ ├── users_update.req │ │ ├── users_update.resp │ │ ├── users_update_portrait.req │ │ ├── users_update_portrait.resp │ │ ├── users_update_portrait_get.req │ │ ├── users_update_portrait_get.resp │ │ ├── users_update_portrait_scale.req │ │ ├── users_update_portrait_scale.resp │ │ ├── userschema.req │ │ ├── userschema.resp │ │ ├── userschema_registration.req │ │ ├── userschema_registration.resp │ │ ├── vocabularies.req │ │ ├── vocabularies.resp │ │ ├── vocabularies_get.req │ │ ├── vocabularies_get.resp │ │ ├── vocabularies_get_fields.req │ │ ├── vocabularies_get_fields.resp │ │ ├── vocabularies_get_filtered.req │ │ ├── vocabularies_get_filtered.resp │ │ ├── vocabularies_get_filtered_by_title.req │ │ ├── vocabularies_get_filtered_by_title.resp │ │ ├── vocabularies_get_filtered_by_token.req │ │ ├── vocabularies_get_filtered_by_token.resp │ │ ├── vocabularies_get_filtered_by_token_list.req │ │ ├── vocabularies_get_filtered_by_token_list.resp │ │ ├── workflow_get.req │ │ ├── workflow_get.resp │ │ ├── workflow_post.req │ │ ├── workflow_post.resp │ │ ├── workflow_post_with_body.req │ │ ├── workflow_post_with_body.resp │ │ ├── workingcopy_baseline_get.req │ │ ├── workingcopy_baseline_get.resp │ │ ├── workingcopy_delete.req │ │ ├── workingcopy_delete.resp │ │ ├── workingcopy_get.req │ │ ├── workingcopy_get.resp │ │ ├── workingcopy_patch.req │ │ ├── workingcopy_patch.resp │ │ ├── workingcopy_post.req │ │ ├── workingcopy_post.resp │ │ ├── workingcopy_wc_get.req │ │ └── workingcopy_wc_get.resp │ ├── image.jpeg │ ├── image.png │ ├── image.svg │ ├── images │ │ ├── image-10mb.jpg │ │ ├── image-1mb.jpg │ │ ├── image-2mb.jpg │ │ └── image-3mb.jpg │ ├── languages.py │ ├── mixin_ordering.py │ ├── performance.py │ ├── statictime.py │ ├── test_addons.py │ ├── test_auth.py │ ├── test_batching.py │ ├── test_behaviors.py │ ├── test_blocks.py │ ├── test_blocks_deserializer.py │ ├── test_blocks_linkintegrity.py │ ├── test_blocks_searchable_text.py │ ├── test_blocks_serializer.py │ ├── test_boolean_value.py │ ├── test_cache_purge_urls.py │ ├── test_caching.py │ ├── test_comments.py │ ├── test_content_blocks.py │ ├── test_content_delete.py │ ├── test_content_get.py │ ├── test_content_local_roles.py │ ├── test_content_patch.py │ ├── test_content_post.py │ ├── test_content_utils.py │ ├── test_copymove.py │ ├── test_documentation.py │ ├── test_documentation_relations.py │ ├── test_dxcontent_deserializer.py │ ├── test_dxcontent_serializer.py │ ├── test_dxfield_deserializer.py │ ├── test_dxfield_publication.py │ ├── test_dxfield_serializer.py │ ├── test_error_handling.py │ ├── test_expansion.py │ ├── test_functional_auth.py │ ├── test_imaging.py │ ├── test_indexers.py │ ├── test_locking.py │ ├── test_pas.py │ ├── test_permissions.py │ ├── test_profile_tiles.py │ ├── test_query_parsers.py │ ├── test_registry.py │ ├── test_registry_serializer.py │ ├── test_resolveuid.py │ ├── test_search.py │ ├── test_search_utils.py │ ├── test_serializer.py │ ├── test_serializer_catalog.py │ ├── test_serializer_converters.py │ ├── test_serializer_group.py │ ├── test_serializer_summary.py │ ├── test_serializer_user.py │ ├── test_services.py │ ├── test_services_actions.py │ ├── test_services_aliases.py │ ├── test_services_breadcrumbs.py │ ├── test_services_comments.py │ ├── test_services_content.py │ ├── test_services_contextnavigation.py │ ├── test_services_controlpanel_dexterity_types.py │ ├── test_services_controlpanels.py │ ├── test_services_database.py │ ├── test_services_email_notification.py │ ├── test_services_email_send.py │ ├── test_services_groups.py │ ├── test_services_history.py │ ├── test_services_inherit.py │ ├── test_services_linkintegrity.py │ ├── test_services_navigation.py │ ├── test_services_navroot.py │ ├── test_services_principals.py │ ├── test_services_querysources.py │ ├── test_services_querystring.py │ ├── test_services_querystringsearch.py │ ├── test_services_roles.py │ ├── test_services_site.py │ ├── test_services_sources.py │ ├── test_services_transactions.py │ ├── test_services_types.py │ ├── test_services_upgrade.py │ ├── test_services_users.py │ ├── test_services_userschema.py │ ├── test_services_vocabularies.py │ ├── test_services_workingcopy.py │ ├── test_setup.py │ ├── test_site_deserializer.py │ ├── test_site_serializer.py │ ├── test_statictime.py │ ├── test_system.py │ ├── test_translations.py │ ├── test_tus.py │ ├── test_types.py │ ├── test_upgrade_ordering.py │ ├── test_upgrades.py │ └── test_workflow.py │ ├── types │ ├── __init__.py │ ├── adapters.py │ ├── configure.zcml │ ├── interfaces.py │ ├── utils.py │ └── z3crelationadapter.py │ └── upgrades │ ├── __init__.py │ ├── configure.zcml │ ├── ordering.py │ ├── profiles │ ├── 0002 │ │ └── rolemap.xml │ └── 0004 │ │ └── rolemap.xml │ ├── to0002.py │ ├── to0003.py │ ├── to0004.py │ ├── to0005.py │ ├── to0006.py │ └── to0007.py ├── swagger-siteroot.yaml ├── test-no-uncommitted-doc-changes └── tox.ini /.coveragerc: -------------------------------------------------------------------------------- 1 | [report] 2 | include = 3 | src/* 4 | omit = 5 | src/plone/restapi/tests/* 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Generated from: 2 | # https://github.com/plone/meta/tree/main/src/plone/meta/default 3 | # See the inline comments on how to expand/tweak this configuration file 4 | version: 2 5 | updates: 6 | 7 | - package-ecosystem: "github-actions" 8 | directory: "/" 9 | schedule: 10 | # Check for updates to GitHub Actions every week 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.github/workflows/rtd-pr-preview.yml: -------------------------------------------------------------------------------- 1 | # .github/workflows/rtd-pr-preview.yml 2 | name: readthedocs/actions 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | # Execute this action only on PRs that touch 8 | # documentation files. 9 | # paths: 10 | # - "docs/**" 11 | 12 | permissions: 13 | pull-requests: write 14 | 15 | jobs: 16 | documentation-links: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: readthedocs/actions/preview@v1 20 | with: 21 | project-slug: "plonerestapi" 22 | single-version: "true" 23 | -------------------------------------------------------------------------------- /.landscape.yml: -------------------------------------------------------------------------------- 1 | ignore-patterns: 2 | - ^bootstrap.*\.py$ 3 | pylint: 4 | disable: 5 | - inherit-non-class # zope.interface 6 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.12 2 | -------------------------------------------------------------------------------- /.vale.ini: -------------------------------------------------------------------------------- 1 | StylesPath = docs/styles 2 | 3 | MinAlertLevel = suggestion 4 | 5 | Vocab = Base,Plone 6 | 7 | Packages = Microsoft 8 | 9 | [*.md] 10 | BasedOnStyles = Vale, Microsoft 11 | Microsoft.Contractions = suggestion 12 | Microsoft.Units = suggestion 13 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Require reviews from the REST API Team 2 | @plone/restapi-team 3 | -------------------------------------------------------------------------------- /constraints.txt: -------------------------------------------------------------------------------- 1 | -c https://dist.plone.org/release/6.2-dev/constraints.txt 2 | -------------------------------------------------------------------------------- /docs/source/_json/vocabularies_get_filtered.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?q=doc HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /docs/source/_json/vocabularies_get_filtered.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?q=doc", 6 | "items": [ 7 | { 8 | "title": "DX Test Document", 9 | "token": "DXTestDocument" 10 | }, 11 | { 12 | "title": "Test Document", 13 | "token": "ATTestDocument" 14 | } 15 | ], 16 | "items_total": 2 17 | } -------------------------------------------------------------------------------- /docs/source/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/source/_static/favicon.ico -------------------------------------------------------------------------------- /docs/source/_static/img/postman_basic_auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/source/_static/img/postman_basic_auth.png -------------------------------------------------------------------------------- /docs/source/_static/img/postman_headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/source/_static/img/postman_headers.png -------------------------------------------------------------------------------- /docs/source/_static/img/postman_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/source/_static/img/postman_request.png -------------------------------------------------------------------------------- /docs/source/_static/img/postman_response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/source/_static/img/postman_response.png -------------------------------------------------------------------------------- /docs/source/_static/img/postman_retain_headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/source/_static/img/postman_retain_headers.png -------------------------------------------------------------------------------- /docs/source/readthedocs-requirements.txt: -------------------------------------------------------------------------------- 1 | sphinxcontrib-httpdomain 2 | sphinxcontrib-httpexample==0.9.1 -------------------------------------------------------------------------------- /docs/source/temp.json: -------------------------------------------------------------------------------- 1 | {"entries": [{ 2 | "id": "test_user_1_", 3 | "roles": {"Contributor": false, 4 | "Editor": false, 5 | "Reader": true, 6 | "Reviewer": true}, 7 | "type": "user"} 8 | ], 9 | "inherit": true 10 | } 11 | -------------------------------------------------------------------------------- /docs/source/usage/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | myst: 3 | html_meta: 4 | "description": "Usage of the Plone REST API." 5 | "property=og:description": "Usage of the Plone REST API." 6 | "property=og:title": "Usage of the Plone REST API" 7 | "keywords": "Plone, plone.restapi, REST, API, Usage" 8 | --- 9 | 10 | (restapi-usage)= 11 | 12 | # Usage 13 | 14 | This part of the documentation explains how to use the Plone REST API. 15 | 16 | ```{toctree} 17 | :caption: Table of Contents 18 | :maxdepth: 2 19 | 20 | authentication 21 | batching 22 | content 23 | customization 24 | expansion 25 | exploring 26 | i18n 27 | serialization 28 | types-schema 29 | blocks 30 | ``` 31 | -------------------------------------------------------------------------------- /docs/styles/config/vocabularies/Base/accept.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/styles/config/vocabularies/Base/accept.txt -------------------------------------------------------------------------------- /docs/styles/config/vocabularies/Base/reject.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/docs/styles/config/vocabularies/Base/reject.txt -------------------------------------------------------------------------------- /docs/styles/config/vocabularies/Plone/reject.txt: -------------------------------------------------------------------------------- 1 | [^.]js 2 | NodeJS 3 | [Pp]re-requisite 4 | -------------------------------------------------------------------------------- /instance.yaml: -------------------------------------------------------------------------------- 1 | default_context: 2 | initial_user_name: "admin" 3 | initial_user_password: "admin" 4 | 5 | zcml_package_includes: ["plone.restapi"] 6 | 7 | db_storage: direct 8 | -------------------------------------------------------------------------------- /mx.ini: -------------------------------------------------------------------------------- 1 | ; This is a mxdev configuration file 2 | ; it can be used to override versions of packages already defined in the 3 | ; constraints files and to add new packages from VCS like git. 4 | ; to learn more about mxdev visit https://pypi.org/project/mxdev/ 5 | 6 | [settings] 7 | main-package = -e .[test] 8 | ignores = 9 | plone.restapi 10 | -------------------------------------------------------------------------------- /news/.changelog_template.jinja: -------------------------------------------------------------------------------- 1 | {% if sections[""] %} 2 | {% for category, val in definitions.items() if category in sections[""] %} 3 | 4 | ### {{ definitions[category]['name'] }} 5 | 6 | {% for text, values in sections[""][category].items() %} 7 | - {{ text }} {{ values|join(', ') }} 8 | {% endfor %} 9 | 10 | {% endfor %} 11 | {% else %} 12 | No significant changes. 13 | 14 | 15 | {% endif %} -------------------------------------------------------------------------------- /news/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/news/.gitkeep -------------------------------------------------------------------------------- /performance/plone-5.2-py3-imac-pro-20191122/jmeter-anonymous-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2-py3-imac-pro-20191122/jmeter-anonymous-read.png -------------------------------------------------------------------------------- /performance/plone-5.2-py3-imac-pro-20191122/jmeter-authenticated-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2-py3-imac-pro-20191122/jmeter-authenticated-read.png -------------------------------------------------------------------------------- /performance/plone-5.2-py3-imac-pro-20191122/jmeter-authenticated-write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2-py3-imac-pro-20191122/jmeter-authenticated-write.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200401/jmeter-anonymous-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200401/jmeter-anonymous-read.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200401/jmeter-authenticated-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200401/jmeter-authenticated-read.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200401/jmeter-authenticated-write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200401/jmeter-authenticated-write.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-anonymous-read-namedfile-5.3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-anonymous-read-namedfile-5.3.1.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-anonymous-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-anonymous-read.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-read-namedfile-5.3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-read-namedfile-5.3.1.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-read.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write-namedfile-5.2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write-namedfile-5.2.1.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write-namedfile-5.3.0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write-namedfile-5.3.0.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write-namedfile-5.3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write-namedfile-5.3.1.png -------------------------------------------------------------------------------- /performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.1-py3-imac-pro-20200404/jmeter-authenticated-write.png -------------------------------------------------------------------------------- /performance/plone-5.2.5-py3.8-imac-pro-20211022/jmeter-anonymous-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.5-py3.8-imac-pro-20211022/jmeter-anonymous-read.png -------------------------------------------------------------------------------- /performance/plone-5.2.5-py3.8-imac-pro-20211022/jmeter-authenticated-read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.5-py3.8-imac-pro-20211022/jmeter-authenticated-read.png -------------------------------------------------------------------------------- /performance/plone-5.2.5-py3.8-imac-pro-20211022/jmeter-authenticated-write.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/plone-5.2.5-py3.8-imac-pro-20211022/jmeter-authenticated-write.png -------------------------------------------------------------------------------- /performance/volto-page-with-images-p.namedfile-5.2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/volto-page-with-images-p.namedfile-5.2.1.png -------------------------------------------------------------------------------- /performance/volto-page-with-images-p.namedfile-5.3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/volto-page-with-images-p.namedfile-5.3.1.png -------------------------------------------------------------------------------- /performance/volto-page-with-news-items-p.namedfile-5.2.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/volto-page-with-news-items-p.namedfile-5.2.1.png -------------------------------------------------------------------------------- /performance/volto-page-with-news-items-p.namedfile-5.3.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/performance/volto-page-with-news-items-p.namedfile-5.3.1.png -------------------------------------------------------------------------------- /requirements-docs.txt: -------------------------------------------------------------------------------- 1 | linkify-it-py 2 | myst-parser 3 | plone-sphinx-theme<2 4 | setuptools # required by sphinxcontrib.httpexample, remove when it migrates to importlib 5 | sphinx-autobuild 6 | sphinx-copybutton 7 | sphinxcontrib.httpdomain 8 | sphinxcontrib.httpexample 9 | sphinxext-opengraph 10 | vale 11 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | -c constraints.txt 2 | plone.restapi[test] 3 | -------------------------------------------------------------------------------- /src/plone/__init__.py: -------------------------------------------------------------------------------- 1 | __import__("pkg_resources").declare_namespace(__name__) 2 | -------------------------------------------------------------------------------- /src/plone/restapi/cache/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/cache/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/cache/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/plone/restapi/demo/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/demo/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/demo/demo.py: -------------------------------------------------------------------------------- 1 | from Products.Five.browser import BrowserView # pragma: no cover 2 | 3 | 4 | class InternalServerErrorView(BrowserView): # pragma: no cover 5 | def __call__(self): 6 | from urllib.error import HTTPError 7 | 8 | raise HTTPError( 9 | "http://nohost/plone/internal_server_error", 10 | 500, 11 | "InternalServerError", 12 | {}, 13 | None, 14 | ) 15 | -------------------------------------------------------------------------------- /src/plone/restapi/deserializer/controlpanels/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/plone/restapi/exceptions.py: -------------------------------------------------------------------------------- 1 | class APIError(Exception): 2 | """Base class for exceptions raised by plone.restapi.""" 3 | 4 | 5 | class DeserializationError(Exception): 6 | """An error happened during deserialization of content.""" 7 | 8 | def __init__(self, msg): 9 | self.msg = msg 10 | 11 | def __str__(self): 12 | return repr(self.msg) 13 | 14 | 15 | class QueryParsingError(Exception): 16 | """An error happened while parsing a search query.""" 17 | -------------------------------------------------------------------------------- /src/plone/restapi/meta.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/plone/restapi/pas/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/pas/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/permissions.py: -------------------------------------------------------------------------------- 1 | # # Required to use the REST API at all, in addition to service specific 2 | # permissions. Granted to Anonymous (i.e. everyone) by default via rolemap.xml 3 | 4 | UseRESTAPI = "plone.restapi: Use REST API" 5 | 6 | PloneManageUsers = "Plone Site Setup: Users and Groups" 7 | -------------------------------------------------------------------------------- /src/plone/restapi/permissions.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | 15 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/blocks/metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0001 4 | 5 | profile-plone.restapi:default 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/blocks/types.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/blocks/types/Document.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/default/browserlayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/default/metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0007 4 | 5 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/performance/import_steps.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | plone.performancetesting installation step. 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/performance/metadata.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 0001 4 | 5 | profile-plone.restapi:default 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/performance/plone.restapi_performance_testing.txt: -------------------------------------------------------------------------------- 1 | # 2 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/testing/catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/testing/componentregistry.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/testing/types.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/plone/restapi/profiles/uninstall/browserlayer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src/plone/restapi/search/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/search/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/search/date_recurring_index.py: -------------------------------------------------------------------------------- 1 | from DateTime import DateTime 2 | from plone.restapi.interfaces import IIndexQueryParser 3 | from plone.restapi.search.query import BaseIndexQueryParser 4 | from Products.DateRecurringIndex.index import DateRecurringIndex 5 | from zope.component import adapter 6 | from zope.interface import implementer 7 | from zope.interface import Interface 8 | 9 | 10 | @implementer(IIndexQueryParser) 11 | @adapter(DateRecurringIndex, Interface, Interface) 12 | class DateRecurringIndexQueryParser(BaseIndexQueryParser): 13 | 14 | query_value_type = DateTime 15 | query_options = {"range": str} 16 | -------------------------------------------------------------------------------- /src/plone/restapi/serializer/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/serializer/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/serializer/controlpanels/configure.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/plone/restapi/services/actions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/actions/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/addons/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/addons/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/addons/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/plone/restapi/services/aliases/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/aliases/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/auth/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/auth/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/auth/get.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.interfaces import ILoginProviders 2 | from plone.restapi.services import Service 3 | from zope.component import getAdapters 4 | 5 | 6 | class Login(Service): 7 | def reply(self): 8 | adapters = getAdapters((self.context,), ILoginProviders) 9 | external_providers = [] 10 | for name, adapter in adapters: 11 | external_providers.extend(adapter.get_providers()) 12 | 13 | return {"options": external_providers} 14 | -------------------------------------------------------------------------------- /src/plone/restapi/services/breadcrumbs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/breadcrumbs/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/content/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/content/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/content/delete.py: -------------------------------------------------------------------------------- 1 | from Acquisition import aq_parent 2 | from plone.app.linkintegrity.exceptions import LinkIntegrityNotificationException 3 | from plone.restapi.services import Service 4 | 5 | 6 | class ContentDelete(Service): 7 | """Deletes a content object.""" 8 | 9 | def reply(self): 10 | 11 | parent = aq_parent(self.context) 12 | try: 13 | parent.manage_delObjects([self.context.getId()]) 14 | except LinkIntegrityNotificationException: 15 | pass 16 | 17 | return self.reply_no_content() 18 | -------------------------------------------------------------------------------- /src/plone/restapi/services/content/get.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.interfaces import ISerializeToJson 2 | from plone.restapi.services import Service 3 | from zope.component import queryMultiAdapter 4 | 5 | 6 | class ContentGet(Service): 7 | """Returns a serialized content object.""" 8 | 9 | def reply(self): 10 | serializer = queryMultiAdapter((self.context, self.request), ISerializeToJson) 11 | 12 | if serializer is None: 13 | self.request.response.setStatus(501) 14 | return dict(error=dict(message="No serializer available.")) 15 | 16 | return serializer(version=self.request.get("version")) 17 | -------------------------------------------------------------------------------- /src/plone/restapi/services/contextnavigation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/contextnavigation/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/contextnavigation/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/plone/restapi/services/controlpanels/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/controlpanels/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/copymove/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/copymove/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/database/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/database/get.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.services import Service 2 | 3 | 4 | class DatabaseGet(Service): 5 | def reply(self): 6 | db = self.context._p_jar.db() 7 | return { 8 | "@id": f"{self.context.absolute_url()}/@database", 9 | "cache_length": db.cacheSize(), 10 | "cache_length_bytes": db.getCacheSizeBytes(), 11 | "cache_detail_length": db.cacheDetailSize(), 12 | "cache_size": db.getCacheSize(), 13 | "database_size": db.objectCount(), 14 | "db_name": db.getName(), 15 | "db_size": db.getSize(), 16 | } 17 | -------------------------------------------------------------------------------- /src/plone/restapi/services/discussion/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/discussion/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/email_notification/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/email_notification/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/email_notification/configure.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/plone/restapi/services/email_send/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/email_send/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/email_send/configure.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/plone/restapi/services/groups/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/groups/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/history/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/history/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/linkintegrity/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/linkintegrity/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/linkintegrity/configure.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/plone/restapi/services/locking/get.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.services import Service 2 | from plone.restapi.services.locking import lock_info 3 | 4 | 5 | class Lock(Service): 6 | """Lock information about the current lock""" 7 | 8 | def reply(self): 9 | return lock_info(self.context) 10 | -------------------------------------------------------------------------------- /src/plone/restapi/services/multilingual/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/multilingual/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/multilingual/locator.py: -------------------------------------------------------------------------------- 1 | from plone.app.multilingual.interfaces import ITranslationLocator 2 | from plone.restapi.services import Service 3 | 4 | 5 | class TranslationLocator(Service): 6 | """Get translation locator placements information""" 7 | 8 | def reply(self): 9 | target_language = self.request.form["target_language"] 10 | 11 | locator = ITranslationLocator(self.context) 12 | parent = locator(target_language) 13 | 14 | return {"@id": parent.absolute_url()} 15 | -------------------------------------------------------------------------------- /src/plone/restapi/services/navigation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/navigation/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/navroot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/navroot/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/principals/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/principals/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/principals/configure.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/plone/restapi/services/querysources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/querysources/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/querystring/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/querystring/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/querystringsearch/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/querystringsearch/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/registry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/registry/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/registry/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/plone/restapi/services/roles/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/roles/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/roles/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/plone/restapi/services/rules/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/rules/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/search/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/search/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/search/configure.zcml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/plone/restapi/services/search/get.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.search.handler import SearchHandler 2 | from plone.restapi.search.utils import unflatten_dotted_dict 3 | from plone.restapi.services import Service 4 | 5 | 6 | class SearchGet(Service): 7 | def reply(self): 8 | query = self.request.form.copy() 9 | query = unflatten_dotted_dict(query) 10 | return SearchHandler(self.context, self.request).search(query) 11 | -------------------------------------------------------------------------------- /src/plone/restapi/services/site/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/site/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/site/configure.zcml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 15 | 16 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/plone/restapi/services/sources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/sources/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/sources/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/plone/restapi/services/system/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/system/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/system/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/plone/restapi/services/transactions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/transactions/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/types/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/upgrade/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/upgrade/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/upgrade/configure.zcml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/plone/restapi/services/users/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/users/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/userschema/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/userschema/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/userschema/configure.zcml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/plone/restapi/services/vocabularies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/vocabularies/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/workflow/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/workflow/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/workingcopy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/services/workingcopy/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/services/workingcopy/get.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.serializer.working_copy import WorkingCopyInfo 2 | from plone.restapi.services import Service 3 | 4 | 5 | class GetWorkingCopy(Service): 6 | def reply(self): 7 | baseline, working_copy = WorkingCopyInfo(self.context).get_working_copy_info() 8 | 9 | return {"working_copy": working_copy, "working_copy_of": baseline} 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/1024x768.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/1024x768.gif -------------------------------------------------------------------------------- /src/plone/restapi/tests/__init__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | 4 | # BBB: Remove when drop Python 3.9 support. 5 | PY3_10 = sys.version_info[0:2] >= (3, 10) 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/file.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/file.pdf -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/404_not_found.req: -------------------------------------------------------------------------------- 1 | GET /plone/non-existing-resource HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/404_not_found.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/non-existing-resource", 6 | "type": "NotFound" 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/actions_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@actions HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@addons/plone.session HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_get_list.req: -------------------------------------------------------------------------------- 1 | GET /plone/@addons HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_install.req: -------------------------------------------------------------------------------- 1 | POST /plone/@addons/plone.session/install HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_install.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_install_profile.req: -------------------------------------------------------------------------------- 1 | POST /plone/@addons/plone.restapi/import/testing-workflows HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_install_profile.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_uninstall.req: -------------------------------------------------------------------------------- 1 | POST /plone/@addons/plone.session/uninstall HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_uninstall.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_upgrade.req: -------------------------------------------------------------------------------- 1 | POST /plone/@addons/plone.session/upgrade HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/addons_upgrade.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_add.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "path": "/new-alias" 10 | }, 11 | { 12 | "path": "/old-alias" 13 | }, 14 | { 15 | "path": "/final-alias" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_add.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/front-page/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "path": "/old-alias" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/front-page/@aliases", 6 | "items": [ 7 | { 8 | "path": "/simple-alias" 9 | } 10 | ], 11 | "items_total": 1 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_add.req: -------------------------------------------------------------------------------- 1 | POST /plone/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "datetime": "2022-05-05", 10 | "path": "/old-page", 11 | "redirect-to": "/front-page" 12 | }, 13 | { 14 | "datetime": "2022-05-05", 15 | "path": "/fizzbuzz", 16 | "redirect-to": "/front-page" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_add.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_add_csv_format.req: -------------------------------------------------------------------------------- 1 | POST /plone/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW 5 | 6 | ------WebKitFormBoundary7MA4YWxkTrZu0gW 7 | Content-Disposition: form-data; name="file"; filename="test_file.csv" 8 | Content-Type: text/csv 9 | 10 | old path,new path,datetime,manual 11 | /old-page,/front-page,2022/01/01 00:00:00 GMT+0,True 12 | 13 | ------WebKitFormBoundary7MA4YWxkTrZu0gW-- 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_add_csv_format.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "path": "/old-page" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_filter.req: -------------------------------------------------------------------------------- 1 | GET /plone/@aliases?q=/fizzbuzz HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_filter.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@aliases", 6 | "items": [ 7 | { 8 | "datetime": "2022-05-05T00:00:00", 9 | "manual": true, 10 | "path": "/fizzbuzz", 11 | "redirect-to": "/front-page" 12 | } 13 | ], 14 | "items_total": 1 15 | } 16 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@aliases HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@aliases", 6 | "items": [ 7 | { 8 | "datetime": "2022-05-05T00:00:00", 9 | "manual": true, 10 | "path": "/fizzbuzz", 11 | "redirect-to": "/front-page" 12 | }, 13 | { 14 | "datetime": "2022-05-05T00:00:00", 15 | "manual": true, 16 | "path": "/old-page", 17 | "redirect-to": "/front-page" 18 | } 19 | ], 20 | "items_total": 2 21 | } 22 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_get_csv_format.req: -------------------------------------------------------------------------------- 1 | GET /plone/@aliases HTTP/1.1 2 | Accept: text/csv 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/aliases_root_get_csv_format.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: text/csv; charset=utf-8 3 | 4 | old path,new path,datetime,manual 5 | /fizzbuzz,/front-page,2022/05/05 00:00:00 GMT+0,True 6 | /old-page,/front-page,2022/05/05 00:00:00 GMT+0,True 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/batching.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/@search?b_size=5&sort_on=path HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/breadcrumbs.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@breadcrumbs HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/breadcrumbs.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/front-page/@breadcrumbs", 6 | "items": [ 7 | { 8 | "@id": "http://localhost:55001/plone/front-page", 9 | "title": "Welcome to Plone" 10 | } 11 | ], 12 | "root": "http://localhost:55001/plone" 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/collection.req: -------------------------------------------------------------------------------- 1 | GET /plone/collection HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/collection_fullobjects.req: -------------------------------------------------------------------------------- 1 | GET /plone/collection?fullobjects HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_add_root.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@comments/ HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "text": "My comment" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_add_root.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Location: http://localhost:55001/plone/front-page/@comments/123456 3 | 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_add_sub.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@comments/123456 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "text": "My reply" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_add_sub.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Location: http://localhost:55001/plone/front-page/@comments/123456 3 | 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/front-page/@comments/123456 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@comments HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_update.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/front-page/@comments/123456 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "text": "My NEW comment" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/comments_update.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Location: http://localhost:55001/plone/front-page/@comments/123456 3 | 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/component_breadcrumbs.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@components/breadcrumbs HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/component_breadcrumbs.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@components", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/component_navigation.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@components/navigation HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/component_navigation.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@components", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/folder/my-document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/my-document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_get_folder.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder?metadata_fields=UID&metadata_fields=Creator HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_patch.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/folder/my-document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "title": "My New Document Title" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_patch.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_patch_representation.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/folder/my-document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Prefer: return=representation 5 | Content-Type: application/json 6 | 7 | { 8 | "title": "My New Document Title" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/folder HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "@type": "Document", 8 | "title": "My Document" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_reorder.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/folder/my-document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "ordering": {"obj_id": "item_3", "delta": "top", "subset_ids": ["item_1", "item_3", "item5"]} 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/content_resort.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/folder HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "sort": {"on": "modified", "order": "descending"} 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/contextnavigation.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/@contextnavigation HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_action_condition.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@controlpanels/content-rules/rule-3/action/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_action_condition.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_dexterity_item.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@controlpanels/dexterity-types/my_custom_content_type HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_dexterity_item.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_rule.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@controlpanels/content-rules/rule-3 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_rule.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_rule_condition.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@controlpanels/content-rules/rule-3/condition/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_delete_rule_condition.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_contentrules.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_dexterity.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/dexterity-types HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_dexterity_item.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/dexterity-types/my_custom_content_type HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_item.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/editing HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_copy.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/2 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_logger.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_mail.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/6 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_move.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/3 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_notify.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_transition.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/5 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_action_versioning.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/action/7 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_condition_fileextension.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/condition/1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_condition_group.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/condition/3 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_condition_portaltype.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/condition/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_condition_role.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/condition/4 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_condition_tales.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/condition/5 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_get_rule_condition_workflowstate.req: -------------------------------------------------------------------------------- 1 | GET /plone/@controlpanels/content-rules/rule-3/condition/2 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/editing HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "default_editor": "CKeditor", 8 | "ext_editor": true 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_dexterity_item.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/dexterity-types/my_custom_content_type HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "A content-type", 8 | "plone.richtext": true, 9 | "plone.versioning": true, 10 | "title": "My Content Type" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_dexterity_item.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "cascading": true, 8 | "description": "Third rule added in the testing setup (modified)", 9 | "enabled": false, 10 | "event": "Comment removed", 11 | "stop": true, 12 | "title": "Third test rule (modified)" 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_action_logger.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3/action/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "Level": "20", 8 | "message": "text_contentrules_logger_message", 9 | "targetLogger": "Plone6" 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_action_logger.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_action_move_down.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3/action/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Move": "_move_down" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_action_move_down.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_action_move_up.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3/action/1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Move": "_move_up" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_action_move_up.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_condition_move_down.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3/condition/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Move": "_move_down" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_condition_move_down.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_condition_move_up.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3/condition/1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Move": "_move_up" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_condition_move_up.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_condition_portaltype.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@controlpanels/content-rules/rule-3/condition/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "check_types": [ 8 | "Collection" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_patch_rule_condition_portaltype.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_dexterity_item.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/dexterity-types HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "A custom content-type", 8 | "title": "My Custom Content Type" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "cascading": false, 8 | "description": "Third rule added in the testing setup", 9 | "enabled": true, 10 | "event": "Comment added", 11 | "stop": false, 12 | "title": "Third test rule" 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_copy.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "target_folder": "SomeUUID000000000000000000000001", 8 | "type": "plone.actions.Copy" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_delete.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "type": "plone.actions.Delete" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_logger.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "Level": "20", 8 | "message": "text_contentrules_logger_message", 9 | "targetLogger": "Plone", 10 | "type": "plone.actions.Logger" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_mail.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "exclude_actor": true, 8 | "message": "And the message body", 9 | "recipients": "test@somethingelse.com", 10 | "source": "noreply@something.com", 11 | "subject": "Email Subject", 12 | "type": "plone.actions.Mail" 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_move.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "target_folder": "SomeUUID000000000000000000000001", 8 | "type": "plone.actions.Move" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_notify.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "message": "Information", 8 | "message_type": "info", 9 | "type": "plone.actions.Notify" 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_transition.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "transition": "hide", 8 | "type": "plone.actions.Workflow" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_action_versioning.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/action HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "comment": "Some comment", 8 | "type": "plone.actions.Versioning" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_condition_fileextension.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/condition HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "file_extension": "JPG", 8 | "type": "plone.conditions.FileExtension" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_condition_group.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/condition HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "group_names": [ 8 | "Administrators", 9 | "Site Administrators" 10 | ], 11 | "type": "plone.conditions.Group" 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_condition_portaltype.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/condition HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "check_types": [ 8 | "Collection", 9 | "Comment" 10 | ], 11 | "type": "plone.conditions.PortalType" 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_condition_role.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/condition HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "role_names": [ 8 | "Anonymous", 9 | "Authenticated" 10 | ], 11 | "type": "plone.conditions.Role" 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_condition_tales.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/condition HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "tales_expression": "", 8 | "type": "plone.conditions.TalesExpression" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/controlpanels_post_rule_condition_workflowstate.req: -------------------------------------------------------------------------------- 1 | POST /plone/@controlpanels/content-rules/rule-3/condition HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "type": "plone.conditions.WorkflowState", 8 | "wf_states": [ 9 | "pending", 10 | "private" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_add_root.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@conversations/default/@comments/ HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "comment": "My comment" 8 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_add_root.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@conversations", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_add_sub.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@conversations/default/@comments/1234 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "comment": "My reply" 8 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_add_sub.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@conversations", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/front-page/@conversations/default/@comments/123456 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@conversations", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_detele.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/folder/my-document/conversations//comments/ HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@conversations/default/@comments/123456 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_update.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/front-page/@conversations/default/@comments/123456 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "comment": "My NEW comment" 8 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_comment_update.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@conversations", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/front-page/@conversations/default HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/conversation_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Resource not found: http://localhost:55001/plone/front-page/@conversations", 6 | "type": "NotFound" 7 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy.json: -------------------------------------------------------------------------------- 1 | POST /plone/@copy 2 | Accept: application/json 3 | 4 | HTTP 200 OK 5 | content-type: application/json 6 | 7 | [ 8 | { 9 | "new": "http://localhost:55001/plone/copy_of_front-page", 10 | "old": "http://localhost:55001/plone/front-page" 11 | } 12 | ] -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy.json.req: -------------------------------------------------------------------------------- 1 | POST /plone/@copy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "source": "http://localhost:55001/plone/front-page" 8 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy.json.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "source": "http://localhost:55001/plone/front-page", 7 | "target": "http://localhost:55001/plone/copy_of_front-page" 8 | } 9 | ] -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy.req: -------------------------------------------------------------------------------- 1 | POST /plone/@copy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "source": "http://localhost:55001/plone/front-page" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "source": "http://localhost:55001/plone/front-page", 7 | "target": "http://localhost:55001/plone/copy_of_front-page" 8 | } 9 | ] 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy_multiple.req: -------------------------------------------------------------------------------- 1 | POST /plone/@copy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "source": [ 8 | "http://localhost:55001/plone/front-page", 9 | "http://localhost:55001/plone/newsitem" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/copy_multiple.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "source": "http://localhost:55001/plone/front-page", 7 | "target": "http://localhost:55001/plone/copy_of_front-page" 8 | }, 9 | { 10 | "source": "http://localhost:55001/plone/newsitem", 11 | "target": "http://localhost:55001/plone/copy_of_newsitem" 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/database_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@database HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/document.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/event.req: -------------------------------------------------------------------------------- 1 | GET /plone/event HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/expansion.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/expansion_expanded.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page?expand=breadcrumbs HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/expansion_expanded_full.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page?expand=actions,breadcrumbs,navigation,workflow,types HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/external_authentication_links.req: -------------------------------------------------------------------------------- 1 | GET /plone/@login HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/external_authentication_links.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "options": [ 6 | { 7 | "id": "myprovider", 8 | "plugin": "myprovider", 9 | "title": "Provider", 10 | "url": "https://some.example.com/login-url" 11 | }, 12 | { 13 | "id": "github", 14 | "plugin": "github", 15 | "title": "GitHub", 16 | "url": "https://some.example.com/login-authomatic/github" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/file.req: -------------------------------------------------------------------------------- 1 | GET /plone/file HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/folder.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups.req: -------------------------------------------------------------------------------- 1 | GET /plone/@groups HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_created.req: -------------------------------------------------------------------------------- 1 | POST /plone/@groups HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "The Plone Framework Team", 8 | "email": "fwt@plone.org", 9 | "groupname": "fwt", 10 | "groups": [ 11 | "Administrators" 12 | ], 13 | "roles": [ 14 | "Manager" 15 | ], 16 | "title": "Framework Team", 17 | "users": [ 18 | "admin", 19 | "test_user_1_" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@groups/ploneteam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_filtered_by_groupname.req: -------------------------------------------------------------------------------- 1 | GET /plone/@groups?query=plo HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_filtered_by_groupname.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "@id": "http://localhost:55001/plone/@groups/ploneteam", 7 | "description": "We are Plone", 8 | "email": "ploneteam@plone.org", 9 | "groupname": "ploneteam", 10 | "id": "ploneteam", 11 | "roles": [ 12 | "Authenticated" 13 | ], 14 | "title": "Plone Team" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@groups/ploneteam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@groups/ploneteam", 6 | "description": "We are Plone", 7 | "email": "ploneteam@plone.org", 8 | "groupname": "ploneteam", 9 | "id": "ploneteam", 10 | "members": { 11 | "@id": "http://localhost:55001/plone/@groups/ploneteam", 12 | "items": [ 13 | "noam" 14 | ], 15 | "items_total": 1 16 | }, 17 | "roles": [ 18 | "Authenticated" 19 | ], 20 | "title": "Plone Team" 21 | } 22 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_update.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@groups/ploneteam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "Plone team members", 8 | "email": "ploneteam2@plone.org", 9 | "groups": [ 10 | "Site Administrators" 11 | ], 12 | "roles": [ 13 | "Authenticated", 14 | "Reviewer" 15 | ], 16 | "title": "The Plone team", 17 | "users": { 18 | "test_user_1_": false 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/groups_update.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/history_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@history HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/history_get_versioned.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/my-document/@history/0 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/history_revert.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/front-page/@history HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "version": 0 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/history_revert.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Welcome to Plone has been reverted to revision 0." 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/image.req: -------------------------------------------------------------------------------- 1 | GET /plone/image HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/inherit.get.req: -------------------------------------------------------------------------------- 1 | GET /plone/document/@inherit?expand.inherit.behaviors=plone.navigationroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/inherit_expansion.req: -------------------------------------------------------------------------------- 1 | GET /plone/document/?expand=inherit&expand.inherit.behaviors=plone.navigationroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/inherit_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/document/@inherit?expand.inherit.behaviors=plone.navigationroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/inherit_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/document/@inherit?expand.inherit.behaviors=plone.navigationroot", 6 | "plone.navigationroot": { 7 | "data": {}, 8 | "from": { 9 | "@id": "http://localhost:55001/plone", 10 | "title": "Plone site" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_logged_in.req: -------------------------------------------------------------------------------- 1 | GET /plone/ HTTP/1.1 2 | Accept: application/json 3 | Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiIn0.S9kUg8j-Iju0eaOpot7asXiZO8mlJX1fQVt9MPQpXBg 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_login.req: -------------------------------------------------------------------------------- 1 | POST /plone/@login HTTP/1.1 2 | Accept: application/json 3 | Content-Type: application/json 4 | 5 | { 6 | "login": "admin", 7 | "password": "secret" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_login.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiIn0.S9kUg8j-Iju0eaOpot7asXiZO8mlJX1fQVt9MPQpXBg" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_login_renew.req: -------------------------------------------------------------------------------- 1 | POST /plone/@login-renew HTTP/1.1 2 | Accept: application/json 3 | Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiIn0.S9kUg8j-Iju0eaOpot7asXiZO8mlJX1fQVt9MPQpXBg 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_login_renew.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiIn0.S9kUg8j-Iju0eaOpot7asXiZO8mlJX1fQVt9MPQpXBg" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_logout.req: -------------------------------------------------------------------------------- 1 | POST /plone/@logout HTTP/1.1 2 | Accept: application/json 3 | Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImZ1bGxuYW1lIjoiIn0.S9kUg8j-Iju0eaOpot7asXiZO8mlJX1fQVt9MPQpXBg 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/jwt_logout.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/link.req: -------------------------------------------------------------------------------- 1 | GET /plone/link HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/linkintegrity_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@linkintegrity?uids=SomeUUID000000000000000000000002 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/linkintegrity_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "@id": "http://localhost:55001/plone/doc-2", 7 | "@type": "Document", 8 | "breaches": [ 9 | { 10 | "@id": "http://localhost:55001/plone/doc-1", 11 | "title": "First document", 12 | "uid": "SomeUUID000000000000000000000001" 13 | } 14 | ], 15 | "description": "", 16 | "items_total": 0, 17 | "review_state": "private", 18 | "title": "Second document", 19 | "type_title": "Page" 20 | } 21 | ] 22 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@lock HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "created": "1995-07-31T17:30:00+00:00", 6 | "creator": "admin", 7 | "creator_name": "admin", 8 | "creator_url": "http://localhost:55001/plone/author/admin", 9 | "locked": true, 10 | "name": "plone.locking.stealable", 11 | "stealable": true, 12 | "time": 807211800.0, 13 | "timeout": 600, 14 | "token": "0.684672730996-0.25195226375-00105A989226:1477076400.000" 15 | } 16 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@lock HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "locked": false, 6 | "stealable": true 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock_nonstealable_timeout.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@lock HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "stealable": false, 8 | "timeout": 3600 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock_nonstealable_timeout.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "created": "1995-07-31T17:30:00+00:00", 6 | "creator": "admin", 7 | "creator_name": "admin", 8 | "creator_url": "http://localhost:55001/plone/author/admin", 9 | "locked": true, 10 | "name": "plone.locking.stealable", 11 | "stealable": true, 12 | "time": 807211800.0, 13 | "timeout": 3600, 14 | "token": "0.684672730996-0.25195226375-00105A989226:1477076400.000" 15 | } 16 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock_update.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/front-page HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Lock-Token: 0.684672730996-0.25195226375-00105A989226:1477076400.000 5 | Content-Type: application/json 6 | 7 | { 8 | "title": "New Title" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/lock_update.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/login.req: -------------------------------------------------------------------------------- 1 | POST /plone/@login HTTP/1.1 2 | Accept: application/json 3 | Content-Type: application/json 4 | 5 | {"login": "admin", "password": "secret"} -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/move.json: -------------------------------------------------------------------------------- 1 | POST /plone/folder/@move 2 | Accept: application/json 3 | 4 | HTTP 200 OK 5 | content-type: application/json 6 | 7 | [ 8 | { 9 | "new": "http://localhost:55001/plone/folder/front-page", 10 | "old": "http://localhost:55001/plone/front-page" 11 | } 12 | ] -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/move.json.req: -------------------------------------------------------------------------------- 1 | POST /plone/folder/@move HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "source": "http://localhost:55001/plone/front-page" 8 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/move.json.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "source": "http://localhost:55001/plone/front-page", 7 | "target": "http://localhost:55001/plone/folder/front-page" 8 | } 9 | ] -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/move.req: -------------------------------------------------------------------------------- 1 | POST /plone/folder/@move HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "source": "http://localhost:55001/plone/front-page" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/move.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | [ 5 | { 6 | "source": "http://localhost:55001/plone/front-page", 7 | "target": "http://localhost:55001/plone/folder/front-page" 8 | } 9 | ] 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navigation.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@navigation HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navigation_tree.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@navigation?expand.navigation.depth=4 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_lang_content_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/en/test-document/@navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_lang_folder_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/en/@navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_site_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_standard_site_content_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_standard_site_content_get_expansion.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page?expand=navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_standard_site_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/navroot_standard_site_get_expansion.req: -------------------------------------------------------------------------------- 1 | GET /plone/?expand=navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/newsitem.req: -------------------------------------------------------------------------------- 1 | GET /plone/newsitem HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/portrait_self_404_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 404 Not Found 2 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/portrait_self_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@portrait HTTP/1.1 2 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/portrait_self_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: image/png 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/portrait_username_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@portrait/username HTTP/1.1 2 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/portrait_username_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: image/png 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/principals.req: -------------------------------------------------------------------------------- 1 | GET /plone/@principals?search=ploneteam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/principals.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "groups": [ 6 | { 7 | "@id": "http://localhost:55001/plone/@groups/ploneteam", 8 | "description": "We are Plone", 9 | "email": "ploneteam@plone.org", 10 | "groupname": "ploneteam", 11 | "id": "ploneteam", 12 | "roles": [ 13 | "Authenticated" 14 | ], 15 | "title": "Plone Team" 16 | } 17 | ], 18 | "users": [] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/querysources_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/doc/@querysources/test_choice_with_querysource?query=2 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/querysources_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/doc/@querysources/test_choice_with_querysource?query=2", 6 | "items": [ 7 | { 8 | "title": "Title 2", 9 | "token": "token2" 10 | } 11 | ], 12 | "items_total": 1 13 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/querystring_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@querystring HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/querystring_get_contextual.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@querystring HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/querystringsearch_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@querystring-search?query=%257B%2522query%2522%253A%255B%257B%2522i%2522%253A%2522portal_type%2522%252C%2522o%2522%253A%2520%2522plone.app.querystring.operation.selection.any%2522%252C%2522v%2522%253A%255B%2522Document%2522%255D%257D%255D%257D HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/querystringsearch_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/@querystring-search HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "query": [ 8 | { 9 | "i": "portal_type", 10 | "o": "plone.app.querystring.operation.selection.any", 11 | "v": [ 12 | "Document" 13 | ] 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/refresh_lock.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/front-page/@lock HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/refresh_lock.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "created": "1995-07-31T17:30:00+00:00", 6 | "creator": "admin", 7 | "creator_name": "admin", 8 | "creator_url": "http://localhost:55001/plone/author/admin", 9 | "locked": true, 10 | "name": "plone.locking.stealable", 11 | "stealable": true, 12 | "time": 807211800.0, 13 | "timeout": 600, 14 | "token": "0.684672730996-0.25195226375-00105A989226:1477076400.000" 15 | } 16 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/registry_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@registry/plone.app.querystring.field.path.title HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/registry_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | "Location" 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/registry_get_list.req: -------------------------------------------------------------------------------- 1 | GET /plone/@registry HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/registry_get_list_filtered.req: -------------------------------------------------------------------------------- 1 | GET /plone/@registry?q=Products.CMFPlone HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/registry_update.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@registry/ HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "plone.app.querystring.field.path.title": "Value" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/registry_update.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_catalog_get_stats.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_catalog_get_stats.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@relations", 6 | "broken": {}, 7 | "stats": { 8 | "comprisesComponentPart": 2, 9 | "relatedItems": 2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "relation": "comprisesComponentPart", 10 | "source": "SomeUUID000000000000000000000001", 11 | "target": "SomeUUID000000000000000000000002" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_anonymous.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Content-Type: application/json 4 | 5 | { 6 | "items": [ 7 | { 8 | "relation": "comprisesComponentPart", 9 | "source": "/document", 10 | "target": "/document-2" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_anonymous.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 401 Unauthorized 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "You are not authorized to access this resource.", 6 | "type": "Unauthorized" 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_combi.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "relation": "relatedItems", 8 | "target": "/document" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_combi.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_failure.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "relation": "comprisesComponentPart", 10 | "source": "/document", 11 | "target": "/dont-know-this-doc" 12 | }, 13 | { 14 | "relation": "comprisesComponentPart", 15 | "source": "/doc-does-not-exist", 16 | "target": "/document" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_path_uid.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "relation": "comprisesComponentPart", 10 | "source": "/document", 11 | "target": "/document-2" 12 | }, 13 | { 14 | "relation": "comprisesComponentPart", 15 | "source": "SomeUUID000000000000000000000001", 16 | "target": "SomeUUID000000000000000000000003" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_path_uid.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_relationname.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "relation": "relatedItems" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_relationname.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_source.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "source": "/document" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_source.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_target.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "target": "/document" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_del_target.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_relationname.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?relation=comprisesComponentPart HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_relationname_anonymous.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?relation=comprisesComponentPart HTTP/1.1 2 | Accept: application/json 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_source_and_relation.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?source=/document&relation=comprisesComponentPart HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_source_anonymous.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?source=/document HTTP/1.1 2 | Accept: application/json 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_source_by_path.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?source=/document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_source_by_uid.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?source=SomeUUID000000000000000000000001 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_get_target.req: -------------------------------------------------------------------------------- 1 | GET /plone/@relations?target=/document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "relation": "relatedItems", 10 | "source": "/document-3", 11 | "target": "/document" 12 | }, 13 | { 14 | "relation": "relatedItems", 15 | "source": "/document-3", 16 | "target": "/document-2" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post_anonyous.req: -------------------------------------------------------------------------------- 1 | POST /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Content-Type: application/json 4 | 5 | { 6 | "items": [ 7 | { 8 | "relation": "comprisesComponentPart", 9 | "source": "/document", 10 | "target": "/document-2" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post_anonyous.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 401 Unauthorized 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "You are not authorized to access this resource.", 6 | "type": "Unauthorized" 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post_failure.req: -------------------------------------------------------------------------------- 1 | POST /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "relation": "comprisesComponentPart", 10 | "source": "/document", 11 | "target": "/document-does-not-exist" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post_failure.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 422 Unprocessable Entity 2 | Content-Type: application/json 3 | 4 | { 5 | "error": { 6 | "failed": [ 7 | [ 8 | { 9 | "relation": "comprisesComponentPart", 10 | "source": "/document", 11 | "target": "/document-does-not-exist" 12 | }, 13 | "Failed on creating a relation. Target not found." 14 | ] 15 | ], 16 | "message": "Failed on creating relations", 17 | "type": "Unprocessable Content" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post_with_uid.req: -------------------------------------------------------------------------------- 1 | POST /plone/@relations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "items": [ 8 | { 9 | "relation": "comprisesComponentPart", 10 | "source": "SomeUUID000000000000000000000001", 11 | "target": "SomeUUID000000000000000000000002" 12 | }, 13 | { 14 | "relation": "comprisesComponentPart", 15 | "source": "SomeUUID000000000000000000000003", 16 | "target": "SomeUUID000000000000000000000002" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_post_with_uid.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_rebuild.req: -------------------------------------------------------------------------------- 1 | POST /plone/@relations/rebuild HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_rebuild.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_rebuild_with_flush.req: -------------------------------------------------------------------------------- 1 | POST /plone/@relations/rebuild HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "flush": 1 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/relations_rebuild_with_flush.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/roles.req: -------------------------------------------------------------------------------- 1 | GET /plone/@roles HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_add.req: -------------------------------------------------------------------------------- 1 | POST /plone/@content-rules/rule-1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_add.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Successfully assigned the rule rule-1" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_apply_subfolders.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Bubble": true, 8 | "rule_ids": [ 9 | "rule-1", 10 | "rule-2" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_apply_subfolders.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Successfully applied ['rule-1', 'rule-2'] to subfolders" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "rule_ids": [ 8 | "rule-1" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Content-Type: text/html;charset=utf-8 3 | 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_disable.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Disable": true, 8 | "rule_ids": [ 9 | "rule-1", 10 | "rule-2" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_disable.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Successfully disabled rules ['rule-1', 'rule-2']" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_disable_apply_subfolders.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.NoBubble": true, 8 | "rule_ids": [ 9 | "rule-1", 10 | "rule-2" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_disable_apply_subfolders.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Disabled apply to subfolders for ['rule-1', 'rule-2']" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_enable.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "form.button.Enable": true, 8 | "rule_ids": [ 9 | "rule-1", 10 | "rule-2" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_enable.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Successfully enabled rules ['rule-1', 'rule-2']" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_move_down.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "operation": "move_down", 8 | "rule_id": "rule-1" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_move_down.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Successfully applied the move_down" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_move_up.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@content-rules HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "operation": "move_up", 8 | "rule_id": "rule-2" 9 | } 10 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/rules_move_up.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Successfully applied the move_up" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search.req: -------------------------------------------------------------------------------- 1 | GET /plone/@search?sort_on=path HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search_fullobjects.req: -------------------------------------------------------------------------------- 1 | GET /plone/@search?SearchableText=lorem&fullobjects=1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search_metadata_fields.req: -------------------------------------------------------------------------------- 1 | GET /plone/@search?SearchableText=lorem&metadata_fields=modified&metadata_fields=created HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search_multiple_paths.req: -------------------------------------------------------------------------------- 1 | GET /plone/@search?sort_on=path&path.query=%2Fplone%2Ffolder1&path.query=%2Fplone%2Ffolder2&path.depth=2 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search_options.req: -------------------------------------------------------------------------------- 1 | GET /plone/@search?sort_on=path&path.query=%2Fplone%2Ffolder1&path.depth=1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search_options.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@search?path.query=%2Fplone%2Ffolder1&path.depth=1", 6 | "items": [ 7 | { 8 | "@id": "http://localhost:55001/plone/folder1/folder2", 9 | "@type": "Folder", 10 | "description": "", 11 | "review_state": "private", 12 | "title": "Folder 2", 13 | "type_title": "Folder" 14 | } 15 | ], 16 | "items_total": 1 17 | } 18 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/search_sort_multiple_indexes.req: -------------------------------------------------------------------------------- 1 | GET /plone/@search?sort_on=portal_type&sort_on=sortable_title HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sharing_folder_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/@sharing HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sharing_folder_get_include_titles.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/@sharing?include_titles=1 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sharing_folder_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/folder/@sharing HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "entries": [ 8 | { 9 | "id": "AuthenticatedUsers", 10 | "roles": { 11 | "Contributor": false, 12 | "Editor": false, 13 | "Reader": true, 14 | "Reviewer": true 15 | }, 16 | "type": "user" 17 | } 18 | ], 19 | "inherit": true 20 | } 21 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sharing_folder_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sharing_search.req: -------------------------------------------------------------------------------- 1 | GET /plone/folder/doc/@sharing?search=admin HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/site_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@site HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/site_get_expand_lang_folder.req: -------------------------------------------------------------------------------- 1 | GET /plone/en?expand=navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/site_get_expand_lang_folder_content.req: -------------------------------------------------------------------------------- 1 | GET /plone/en/test-document?expand=navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/site_get_expand_navroot.req: -------------------------------------------------------------------------------- 1 | GET /plone/?expand=navroot HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/siteroot.req: -------------------------------------------------------------------------------- 1 | GET /plone HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sources_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/doc/@sources/test_choice_with_source HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/sources_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/doc/@sources/test_choice_with_source", 6 | "items": [ 7 | { 8 | "title": "Title 1", 9 | "token": "token1" 10 | }, 11 | { 12 | "title": "Title 2", 13 | "token": "token2" 14 | }, 15 | { 16 | "title": "Title 3", 17 | "token": "token3" 18 | } 19 | ], 20 | "items_total": 3 21 | } 22 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/system_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@system HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/transactions_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@transactions HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/transactions_revert.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@transactions HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "transaction_ids": ["QStvcExLS1ZiRlU9"] 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/transactions_revert.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "message": "Transactions has been reverted successfully." 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translated_messages_addons.req: -------------------------------------------------------------------------------- 1 | GET /plone/@addons HTTP/1.1 2 | Accept: application/json 3 | Accept-Language: es 4 | Authorization: Basic YWRtaW46c2VjcmV0 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translated_messages_object_history.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@history HTTP/1.1 2 | Accept: application/json 3 | Accept-Language: es 4 | Authorization: Basic YWRtaW46c2VjcmV0 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translated_messages_object_workflow.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@workflow HTTP/1.1 2 | Accept: application/json 3 | Accept-Language: es 4 | Authorization: Basic YWRtaW46c2VjcmV0 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translated_messages_types.req: -------------------------------------------------------------------------------- 1 | GET /plone/@types HTTP/1.1 2 | Accept: application/json 3 | Accept-Language: es 4 | Authorization: Basic YWRtaW46c2VjcmV0 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translated_messages_types_folder.req: -------------------------------------------------------------------------------- 1 | GET /plone/@types/Folder HTTP/1.1 2 | Accept: application/json 3 | Accept-Language: es 4 | Authorization: Basic YWRtaW46c2VjcmV0 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translation_locator.req: -------------------------------------------------------------------------------- 1 | GET /plone/es/test-document/@translation-locator?target_language=de HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translation_locator.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/de" 6 | } 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/en/test-document/@translations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "language": "es" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_expand_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/en/test-document?expand=translations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/en/test-document/@translations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/en/test-document/@translations", 6 | "items": [ 7 | { 8 | "@id": "http://localhost:55001/plone/es/test-document", 9 | "language": "es" 10 | } 11 | ], 12 | "root": { 13 | "de": "http://localhost:55001/plone/de", 14 | "en": "http://localhost:55001/plone/en", 15 | "es": "http://localhost:55001/plone/es", 16 | "fr": "http://localhost:55001/plone/fr" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_link_on_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/de HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "@type": "Document", 8 | "id": "mydocument", 9 | "language": "de", 10 | "title": "My German Document", 11 | "translation_of": "SomeUUID000000000000000000000003" 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/en/test-document/@translations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "id": "http://localhost:55001/plone/es/test-document" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Content-Type: application/json 3 | Location: http://localhost:55001/plone/en/test-document 4 | 5 | {} 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_post_by_id.req: -------------------------------------------------------------------------------- 1 | POST /plone/en/test-document/@translations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "id": "/es/test-document" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_post_by_id.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Content-Type: application/json 3 | Location: http://localhost:55001/plone/en/test-document 4 | 5 | {} 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_post_by_uid.req: -------------------------------------------------------------------------------- 1 | POST /plone/en/test-document/@translations HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "id": "SomeUUID000000000000000000000003" 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_post_by_uid.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Content-Type: application/json 3 | Location: http://localhost:55001/plone/en/test-document 4 | 5 | {} 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/translations_unexpanded_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/en/test-document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusreplace_patch.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/myfile/@tus-upload/4e465958b24a46ec8657e6f3be720991 HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Tus-Resumable: 1.0.0 5 | Upload-Offset: 0 6 | Content-Type: application/offset+octet-stream 7 | 8 | abcdefgh -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusreplace_patch.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Location: http://localhost:55001/plone/myfile 3 | Tus-Resumable: 1.0.0 4 | Upload-Offset: 8 5 | 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusreplace_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/myfile/@tus-replace HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Tus-Resumable: 1.0.0 5 | Upload-Length: 8 6 | Upload-Metadata: filename dGVzdC50eHQ=,content-type dGV4dC9wbGFpbg== 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusreplace_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Location: http://localhost:55001/plone/myfile/@tus-upload/4e465958b24a46ec8657e6f3be720991 3 | Tus-Resumable: 1.0.0 4 | 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_head.req: -------------------------------------------------------------------------------- 1 | HEAD /plone/folder/@tus-upload/032803b64ad746b3ab46d9223ea3d90f HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Tus-Resumable: 1.0.0 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_head.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Tus-Resumable: 1.0.0 3 | Upload-Length: 8 4 | Upload-Offset: 3 5 | 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_options.req: -------------------------------------------------------------------------------- 1 | OPTIONS /plone/folder/@tus-upload HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_options.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Tus-Extension: creation,expiration 3 | Tus-Resumable: 1.0.0 4 | Tus-Version: 1.0.0 5 | 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_patch.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/folder/@tus-upload/032803b64ad746b3ab46d9223ea3d90f HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Tus-Resumable: 1.0.0 5 | Upload-Offset: 0 6 | Content-Type: application/offset+octet-stream 7 | 8 | abc -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_patch.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Tus-Resumable: 1.0.0 3 | Upload-Offset: 3 4 | 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_patch_finalized.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/folder/@tus-upload/032803b64ad746b3ab46d9223ea3d90f HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Tus-Resumable: 1.0.0 5 | Upload-Offset: 3 6 | Content-Type: application/offset+octet-stream 7 | 8 | defgh -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_patch_finalized.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Location: http://localhost:55001/plone/folder/document-2016-10-21 3 | Tus-Resumable: 1.0.0 4 | Upload-Offset: 8 5 | 6 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/folder/@tus-upload HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Tus-Resumable: 1.0.0 5 | Upload-Length: 8 6 | Upload-Metadata: filename dGVzdC50eHQ=,content-type dGV4dC9wbGFpbg== 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/tusupload_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Location: http://localhost:55001/plone/folder/@tus-upload/032803b64ad746b3ab46d9223ea3d90f 3 | Tus-Resumable: 1.0.0 4 | 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types.req: -------------------------------------------------------------------------------- 1 | GET /plone/@types HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document.req: -------------------------------------------------------------------------------- 1 | GET /plone/@types/Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_delete_field.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@types/Document/author_email HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_delete_field.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Content-Type: application/json 3 | 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_delete_fieldset.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@types/Document/contact_info HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_delete_fieldset.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_delete_fieldset_error.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@types/Document/contact_info HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_delete_fieldset_error.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | Location: 3 | 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_get_field.req: -------------------------------------------------------------------------------- 1 | GET /plone/@types/Document/author_email HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_get_field.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "behavior": "plone.dexterity.schema.generated.plone_5_1234567890_2_123456_0_Document", 6 | "description": "Email of the author", 7 | "factory": "Email", 8 | "title": "Author email", 9 | "type": "string", 10 | "widget": "email" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_get_fieldset.req: -------------------------------------------------------------------------------- 1 | GET /plone/@types/Document/contact_info HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_get_fieldset.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "behavior": "plone.dexterity.schema.generated", 6 | "description": "Contact information", 7 | "fields": [], 8 | "id": "contact_info", 9 | "title": "Contact Info" 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@types/Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "properties": { 8 | "author_email": { 9 | "default": "foo@bar.com", 10 | "maxLength": 10, 11 | "minLength": 5 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_field.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@types/Document/author_email HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "The e-mail address of the author", 8 | "maxLength": 20, 9 | "minLength": 10, 10 | "required": true, 11 | "title": "Author e-mail" 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_field.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_fieldset.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@types/Document/contact_info HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "Contact information", 8 | "fields": [ 9 | "author_email" 10 | ], 11 | "title": "Contact information" 12 | } 13 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_fieldset.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_fieldsets.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@types/Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "fieldsets": [ 8 | { 9 | "fields": [ 10 | "author_email" 11 | ], 12 | "id": "contact_info", 13 | "title": "Contact info" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_fieldsets.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_properites.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@types/Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "properties": { 8 | "author_email": { 9 | "default": "foo@bar.com", 10 | "maxLength": 20, 11 | "minLength": 5 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_patch_properites.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_post_field.req: -------------------------------------------------------------------------------- 1 | POST /plone/@types/Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "Email of the author", 8 | "factory": "Email", 9 | "required": true, 10 | "title": "Author email" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_post_field.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Content-Type: application/json 3 | 4 | { 5 | "behavior": "plone.dexterity.schema.generated.plone_5_1234567890_2_123456_0_Document", 6 | "description": "Email of the author", 7 | "factory": "Email", 8 | "title": "Author email", 9 | "type": "string", 10 | "widget": "email" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_post_fieldset.req: -------------------------------------------------------------------------------- 1 | POST /plone/@types/Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "Contact information", 8 | "factory": "fieldset", 9 | "title": "Contact Info" 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_post_fieldset.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Content-Type: application/json 3 | 4 | { 5 | "behavior": "plone.dexterity.schema.generated", 6 | "description": "Contact information", 7 | "fields": [], 8 | "id": "contact_info", 9 | "title": "Contact Info" 10 | } 11 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/types_document_put.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/unlock.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/front-page/@lock HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/unlock.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "locked": false, 6 | "stealable": true 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/unlock_force.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/front-page/@lock HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "force": true 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/unlock_force.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "locked": false, 6 | "stealable": true 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/upgrade_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@upgrade HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46Y29ycmVjdCBob3JzZSBiYXR0ZXJ5IHN0YXBsZQ== 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/upgrade_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/@upgrade HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46Y29ycmVjdCBob3JzZSBiYXR0ZXJ5IHN0YXBsZQ== 4 | Content-Type: application/json 5 | 6 | { 7 | "dry_run": false 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/upgrade_post_dry_run.req: -------------------------------------------------------------------------------- 1 | POST /plone/@upgrade HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46Y29ycmVjdCBob3JzZSBiYXR0ZXJ5IHN0YXBsZQ== 4 | Content-Type: application/json 5 | 6 | { 7 | "dry_run": true 8 | } 9 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_add.req: -------------------------------------------------------------------------------- 1 | POST /plone/@users HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "Professor of Linguistics", 8 | "email": "noam.chomsky@example.com", 9 | "fullname": "Noam Avram Chomsky", 10 | "home_page": "web.mit.edu/chomsky", 11 | "location": "Cambridge, MA", 12 | "sendPasswordReset": true, 13 | "username": "noamchomsky" 14 | } 15 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_anonymous.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users HTTP/1.1 2 | Accept: application/json 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_anonymous.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 401 Unauthorized 2 | Content-Type: application/json 3 | 4 | null 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_anonymous_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_anonymous_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 401 Unauthorized 2 | Content-Type: application/json 3 | 4 | null 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_authorized_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic bm9hbTpjb3JyZWN0IGhvcnNlIGJhdHRlcnkgc3RhcGxl 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_created.req: -------------------------------------------------------------------------------- 1 | POST /plone/@users HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "description": "Professor of Linguistics", 8 | "email": "noam.chomsky@example.com", 9 | "fullname": "Noam Avram Chomsky", 10 | "home_page": "web.mit.edu/chomsky", 11 | "location": "Cambridge, MA", 12 | "password": "colorlessgreenideas", 13 | "roles": [ 14 | "Contributor" 15 | ], 16 | "username": "noamchomsky" 17 | } 18 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_delete_no_localroles.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/x-www-form-urlencoded 5 | 6 | delete_localroles=0 -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_delete_no_localroles.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_delete_no_memberareas.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/x-www-form-urlencoded 5 | 6 | delete_memberareas=0 -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_delete_no_memberareas.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_filtered_by_groups.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users?groups-filter%3Alist=Reviewers&groups-filter%3Alist=Site+Administrators HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_filtered_by_username.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users?query=oam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_reset.req: -------------------------------------------------------------------------------- 1 | POST /plone/@users/noam/rest-password HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | {"reset_token": "ef3d2aabacdc2345df63d6acf2edbef4", "new_password": "verysecret"} 7 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_searched.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users?search=avram HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_unauthorized.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic bm9hbTpwYXNzd29yZA== 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_unauthorized.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 401 Unauthorized 2 | Content-Type: application/json 3 | 4 | null 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_unauthorized_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic bm9hbS1mYWtlOmNvcnJlY3QgaG9yc2UgYmF0dGVyeSBzdGFwbGU= 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_unauthorized_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 401 Unauthorized 2 | Content-Type: application/json 3 | 4 | null 5 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "email": "avram.chomsky@example.com", 8 | "roles": { 9 | "Contributor": false 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update_portrait.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "portrait": { 8 | "content-type": "image/gif", 9 | "data": "R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=", 10 | "encoding": "base64", 11 | "filename": "image.gif" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update_portrait.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update_portrait_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "portrait": { 8 | "content-type": "image/gif", 9 | "data": "R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=", 10 | "encoding": "base64", 11 | "filename": "image.gif" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update_portrait_scale.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/@users/noam HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "portrait": { 8 | "content-type": "image/gif", 9 | "data": "R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=", 10 | "encoding": "base64", 11 | "filename": "image.gif", 12 | "scale": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/users_update_portrait_scale.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/userschema.req: -------------------------------------------------------------------------------- 1 | GET /plone/@userschema HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/userschema_registration.req: -------------------------------------------------------------------------------- 1 | GET /plone/@userschema/registration HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_fields.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/Fields HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?title=doc HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered_by_title.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?title=doc HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered_by_title.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?title=doc", 6 | "items": [ 7 | { 8 | "title": "DX Test Document", 9 | "token": "DXTestDocument" 10 | }, 11 | { 12 | "title": "Test Document", 13 | "token": "ATTestDocument" 14 | } 15 | ], 16 | "items_total": 2 17 | } 18 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered_by_token.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?token=Document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered_by_token.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?token=Document", 6 | "items": [ 7 | { 8 | "title": "Page", 9 | "token": "Document" 10 | } 11 | ], 12 | "items_total": 1 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered_by_token_list.req: -------------------------------------------------------------------------------- 1 | GET /plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?tokens=Document&tokens=Event HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/vocabularies_get_filtered_by_token_list.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes?tokens=Document&tokens=Event", 6 | "items": [ 7 | { 8 | "title": "Event", 9 | "token": "Event" 10 | }, 11 | { 12 | "title": "Page", 13 | "token": "Document" 14 | } 15 | ], 16 | "items_total": 2 17 | } 18 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workflow_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/front-page/@workflow HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workflow_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/front-page/@workflow/publish HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workflow_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "action": "publish", 6 | "actor": "admin", 7 | "comments": "", 8 | "review_state": "published", 9 | "time": "1995-07-31T18:30:00+00:00", 10 | "title": "Published with accent \u00e9" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workflow_post_with_body.req: -------------------------------------------------------------------------------- 1 | POST /plone/folder/@workflow/publish HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | Content-Type: application/json 5 | 6 | { 7 | "comment": "Publishing my folder...", 8 | "effective": "2018-01-21T08:00:00", 9 | "expires": "2019-01-21T08:00:00", 10 | "include_children": true 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workflow_post_with_body.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "action": "publish", 6 | "actor": "admin", 7 | "comments": "Publishing my folder...", 8 | "review_state": "published", 9 | "time": "1995-07-31T18:30:00+00:00", 10 | "title": "Published with accent \u00e9" 11 | } 12 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_baseline_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_delete.req: -------------------------------------------------------------------------------- 1 | DELETE /plone/copy_of_document/@workingcopy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_delete.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/document/@workingcopy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_get.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Content-Type: application/json 3 | 4 | { 5 | "working_copy": { 6 | "@id": "http://localhost:55001/plone/copy_of_document", 7 | "created": "1995-07-31T13:45:00+00:00", 8 | "creator_name": "admin", 9 | "creator_url": "http://localhost:55001/plone/author/admin", 10 | "title": "Test document" 11 | }, 12 | "working_copy_of": null 13 | } 14 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_patch.req: -------------------------------------------------------------------------------- 1 | PATCH /plone/copy_of_document/@workingcopy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_patch.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 204 No Content 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_post.req: -------------------------------------------------------------------------------- 1 | POST /plone/document/@workingcopy HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_post.resp: -------------------------------------------------------------------------------- 1 | HTTP/1.1 201 Created 2 | Content-Type: application/json 3 | Location: http://localhost:55001/plone/document 4 | 5 | { 6 | "@id": "http://localhost:55001/plone/copy_of_document" 7 | } 8 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/http-examples/workingcopy_wc_get.req: -------------------------------------------------------------------------------- 1 | GET /plone/copy_of_document HTTP/1.1 2 | Accept: application/json 3 | Authorization: Basic YWRtaW46c2VjcmV0 4 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/image.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/image.jpeg -------------------------------------------------------------------------------- /src/plone/restapi/tests/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/image.png -------------------------------------------------------------------------------- /src/plone/restapi/tests/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/plone/restapi/tests/images/image-10mb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/images/image-10mb.jpg -------------------------------------------------------------------------------- /src/plone/restapi/tests/images/image-1mb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/images/image-1mb.jpg -------------------------------------------------------------------------------- /src/plone/restapi/tests/images/image-2mb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/images/image-2mb.jpg -------------------------------------------------------------------------------- /src/plone/restapi/tests/images/image-3mb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/tests/images/image-3mb.jpg -------------------------------------------------------------------------------- /src/plone/restapi/types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/types/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/types/interfaces.py: -------------------------------------------------------------------------------- 1 | """Interfaces.""" 2 | 3 | from zope.interface import Interface 4 | 5 | 6 | class IJsonSchemaProvider(Interface): 7 | pass 8 | -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plone/plone.restapi/6003b7ead6c63a3aacccbc600adf5765e9eed4ae/src/plone/restapi/upgrades/__init__.py -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/profiles/0002/rolemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/profiles/0004/rolemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/to0002.py: -------------------------------------------------------------------------------- 1 | def assign_use_api_permission(setup_context): 2 | """Assign the 'plone.restapi: Use REST API' permission to Anonymous.""" 3 | setup_context.runImportStepFromProfile( 4 | "profile-plone.restapi.upgrades:0002", 5 | "rolemap", 6 | run_dependencies=False, 7 | purge_old=False, 8 | ) 9 | -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/to0003.py: -------------------------------------------------------------------------------- 1 | from plone.restapi.setuphandlers import install_pas_plugin 2 | from Products.CMFCore.utils import getToolByName 3 | 4 | 5 | def install_pas_plugin_in_zope_root(setup_context): 6 | """Install PAS plugin in Zope root""" 7 | portal = getToolByName(setup_context, "portal_url").getPortalObject() 8 | install_pas_plugin(portal) 9 | -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/to0004.py: -------------------------------------------------------------------------------- 1 | def assign_get_users_permission(setup_context): 2 | """Assign the 'plone.restapi: Access Plone user information' permission 3 | to Managers by default. 4 | """ 5 | setup_context.runImportStepFromProfile( 6 | "profile-plone.restapi.upgrades:0004", 7 | "rolemap", 8 | run_dependencies=False, 9 | purge_old=False, 10 | ) 11 | -------------------------------------------------------------------------------- /src/plone/restapi/upgrades/to0007.py: -------------------------------------------------------------------------------- 1 | from plone import api 2 | 3 | import logging 4 | 5 | 6 | logger = logging.getLogger(__name__) 7 | 8 | 9 | def site_administrator_permission(setup_context): 10 | """Give permission plone.restapi: Access Plone user information to 11 | Site Administrator""" 12 | api.portal.get().manage_permission( 13 | "plone.restapi: Access Plone user information", 14 | roles=["Manager", "Site Administrator"], 15 | acquire=1, 16 | ) 17 | logger.info( 18 | "Give permission plone.restapi: Access Plone user information to Site Administrator" 19 | ) 20 | --------------------------------------------------------------------------------