Registry#

Registry records can be addressed through the @registry endpoint on the Plone site. To address a specific record, the fully qualified dotted name of the registry record has to be passed as a path segment, for example, /plone/@registy/my.record.

Reading or writing registry records require the cmf.ManagePortal permission.

Reading registry records#

Reading a single record:

http

GET /plone/@registry/plone.app.querystring.field.path.title HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0

curl

curl -i -X GET http://nohost/plone/@registry/plone.app.querystring.field.path.title -H "Accept: application/json" --user admin:secret

httpie

http http://nohost/plone/@registry/plone.app.querystring.field.path.title Accept:application/json -a admin:secret

python-requests

requests.get('http://nohost/plone/@registry/plone.app.querystring.field.path.title', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

"Location"

Listing registry records#

The registry records listing uses a batched method to access all registry records. See Batching for more details on how to work with batched results.

The output record contains the following fields:

  • name: The record's fully qualified dotted name.

  • value: The record's value. This is the same as GETting @registry/name:

http

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

curl

curl -i -X GET http://nohost/plone/@registry -H "Accept: application/json" --user admin:secret

httpie

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

python-requests

requests.get('http://nohost/plone/@registry', headers={'Accept': 'application/json'}, auth=('admin', 'secret'))

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@id": "http://localhost:55001/plone/@registry",
    "batching": {
        "@id": "http://localhost:55001/plone/@registry",
        "first": "http://localhost:55001/plone/@registry?b_start=0",
        "last": "http://localhost:55001/plone/@registry?b_start=2950",
        "next": "http://localhost:55001/plone/@registry?b_start=25"
    },
    "items": [
        {
            "name": "Products.CMFPlone.i18nl10n.override_dateformat.Enabled",
            "schema": {
                "properties": {
                    "description": "Override the translation machinery",
                    "factory": "Yes/No",
                    "title": "Enabled",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "Products.CMFPlone.i18nl10n.override_dateformat.date_format_long",
            "schema": {
                "properties": {
                    "description": "Default value: %Y-%m-%d %H:%M (2038-01-19 03:14)",
                    "factory": "Text line (String)",
                    "title": "old ZMI property: localLongTimeFormat",
                    "type": "string"
                }
            },
            "value": "%Y-%m-%d %H:%M"
        },
        {
            "name": "Products.CMFPlone.i18nl10n.override_dateformat.date_format_short",
            "schema": {
                "properties": {
                    "description": "Default value: %Y-%m-%d (2038-01-19)",
                    "factory": "Text line (String)",
                    "title": "old ZMI property: localTimeFormat",
                    "type": "string"
                }
            },
            "value": "%Y-%m-%d"
        },
        {
            "name": "Products.CMFPlone.i18nl10n.override_dateformat.time_format",
            "schema": {
                "properties": {
                    "description": "Default value: %H:%M (03:14)",
                    "factory": "Text line (String)",
                    "title": "old ZMI property: localTimeOnlyFormat",
                    "type": "string"
                }
            },
            "value": "%H:%M"
        },
        {
            "name": "plone.alignment_styles",
            "schema": {
                "properties": {
                    "additionalItems": true,
                    "default": [
                        "Left|alignleft|align-left",
                        "Center|aligncenter|align-center",
                        "Right|alignright|align-right",
                        "Justify|alignjustify|align-justify"
                    ],
                    "description": "Name|format|icon",
                    "factory": "List",
                    "items": {
                        "description": "",
                        "factory": "Text line (String)",
                        "title": "",
                        "type": "string"
                    },
                    "title": "Alignment styles",
                    "type": "array",
                    "uniqueItems": false
                }
            },
            "value": [
                "Left|alignleft|align-left",
                "Center|aligncenter|align-center",
                "Right|alignright|align-right",
                "Justify|alignjustify|align-justify"
            ]
        },
        {
            "name": "plone.allow_anon_views_about",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If not selected only logged-in users will be able to view information about who created an item and when it was modified.",
                    "factory": "Yes/No",
                    "title": "Allow anyone to view 'about' information",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.allow_external_login_sites",
            "schema": {
                "properties": {
                    "additionalItems": true,
                    "default": [],
                    "description": "",
                    "factory": "Tuple",
                    "items": {
                        "description": "",
                        "factory": "Text line (String)",
                        "title": "",
                        "type": "string"
                    },
                    "title": "Allow external login sites",
                    "type": "array",
                    "uniqueItems": true
                }
            },
            "value": []
        },
        {
            "name": "plone.allowed_sizes",
            "schema": {
                "properties": {
                    "additionalItems": true,
                    "default": [
                        "huge 1600:65536",
                        "great 1200:65536",
                        "larger 1000:65536",
                        "large 800:65536",
                        "teaser 600:65536",
                        "preview 400:65536",
                        "mini 200:65536",
                        "thumb 128:128",
                        "tile 64:64",
                        "icon 32:32",
                        "listing 16:16"
                    ],
                    "description": "Specify all allowed maximum image dimensions, one per line. The required format is <name> <width>:<height>.",
                    "factory": "List",
                    "items": {
                        "description": "",
                        "factory": "Text line (String)",
                        "title": "",
                        "type": "string"
                    },
                    "title": "Allowed image sizes",
                    "type": "array",
                    "uniqueItems": false
                }
            },
            "value": [
                "huge 1600:65536",
                "great 1200:65536",
                "larger 1000:65536",
                "large 800:65536",
                "teaser 600:65536",
                "preview 400:65536",
                "mini 200:65536",
                "thumb 128:128",
                "tile 64:64",
                "icon 32:32",
                "listing 16:16"
            ]
        },
        {
            "name": "plone.allowed_types",
            "schema": {
                "properties": {
                    "additionalItems": true,
                    "default": [
                        "text/html",
                        "text/x-web-textile"
                    ],
                    "description": "Select which formats are available for users as alternative to the default format. Note that if new formats are installed, they will be enabled for text fields by default unless explicitly turned off here or by the relevant installer.",
                    "factory": "Tuple",
                    "items": {
                        "description": "",
                        "factory": "Choice",
                        "title": "",
                        "type": "string",
                        "vocabulary": {
                            "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowableContentTypes"
                        }
                    },
                    "title": "Alternative formats",
                    "type": "array",
                    "uniqueItems": true
                }
            },
            "value": [
                "text/html",
                "text/x-web-textile"
            ]
        },
        {
            "name": "plone.always_show_selector",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "",
                    "factory": "Yes/No",
                    "title": "Always show language selector",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.anonymous_comments",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, anonymous users are able to post comments without logging in. It is highly recommended to use a captcha solution to prevent spam if this setting is enabled.",
                    "factory": "Yes/No",
                    "title": "Enable anonymous comments",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.anonymous_email_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, anonymous user will have to give their email.",
                    "factory": "Yes/No",
                    "title": "Enable anonymous email field",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.captcha",
            "schema": {
                "properties": {
                    "default": "disabled",
                    "description": "Use this setting to enable or disable Captcha validation for comments. Install plone.formwidget.captcha, plone.formwidget.recaptcha, plone.formwidget.hcaptcha, collective.akismet, or collective.z3cform.norobots if there are no options available.",
                    "factory": "Choice",
                    "title": "Captcha",
                    "type": "string",
                    "vocabulary": {
                        "@id": "http://localhost:55001/plone/@vocabularies/plone.app.discussion.vocabularies.CaptchaVocabulary"
                    }
                }
            },
            "value": "disabled"
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.delete_own_comment_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, supports deleting of own comments for users with the \"Delete own comments\" permission.",
                    "factory": "Yes/No",
                    "title": "Enable deleting own comments",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.edit_comment_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, supports editing of comments for users with the \"Edit comments\" permission.",
                    "factory": "Yes/No",
                    "title": "Enable editing of comments",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.globally_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, users are able to post comments on the site. However, you will still need to enable comments for specific content types, folders or content objects before users will be able to post comments.",
                    "factory": "Yes/No",
                    "title": "Globally enable comments",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.moderation_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, comments will enter a \"Pending\" state in which they are invisible to the public. A user with the \"Review comments\" permission (\"Reviewer\" or \"Manager\") can approve comments to make them visible to the public. If you want to enable a custom comment workflow, you have to go to the types control panel.",
                    "factory": "Yes/No",
                    "title": "Enable comment moderation",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.moderator_email",
            "schema": {
                "properties": {
                    "description": "Address to which moderator notifications will be sent.",
                    "factory": "Text line (String)",
                    "title": "Moderator Email Address",
                    "type": "string"
                }
            },
            "value": null
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.moderator_notification_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, the moderator is notified if a comment needs attention. The moderator email address can be set below.",
                    "factory": "Yes/No",
                    "title": "Enable moderator email notification",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.show_commenter_image",
            "schema": {
                "properties": {
                    "default": true,
                    "description": "If selected, an image of the user is shown next to the comment.",
                    "factory": "Yes/No",
                    "title": "Show commenter image",
                    "type": "boolean"
                }
            },
            "value": true
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.text_transform",
            "schema": {
                "properties": {
                    "default": "text/plain",
                    "description": "Use this setting to choose if the comment text should be transformed in any way. You can choose between \"Plain text\" and \"Intelligent text\". \"Intelligent text\" converts plain text into HTML where line breaks and indentation is preserved, and web and email addresses are made into clickable links.",
                    "factory": "Choice",
                    "title": "Comment text transform",
                    "type": "string",
                    "vocabulary": {
                        "@id": "http://localhost:55001/plone/@vocabularies/plone.app.discussion.vocabularies.TextTransformVocabulary"
                    }
                }
            },
            "value": "text/plain"
        },
        {
            "name": "plone.app.discussion.interfaces.IDiscussionSettings.user_notification_enabled",
            "schema": {
                "properties": {
                    "default": false,
                    "description": "If selected, users can choose to be notified of new comments by email.",
                    "factory": "Yes/No",
                    "title": "Enable user email notification",
                    "type": "boolean"
                }
            },
            "value": false
        },
        {
            "name": "plone.app.layout.globals.bodyClass.depth",
            "schema": {
                "properties": {
                    "description": "Depth relative the site root that body class are generated for.\n      ",
                    "factory": "Integer",
                    "title": "Body class path depth",
                    "type": "integer"
                }
            },
            "value": 4
        },
        {
            "name": "plone.app.portlets.PortletManagerBlacklist",
            "schema": {
                "properties": {
                    "additionalItems": true,
                    "description": "A list of portlet manager names that will not be shown in the toolbar dropdown",
                    "factory": "List",
                    "items": {
                        "description": "",
                        "factory": "Text line (String)",
                        "title": "",
                        "type": "string"
                    },
                    "title": "Toolbar Portlet Manager Blacklist",
                    "type": "array",
                    "uniqueItems": false
                }
            },
            "value": [
                "plone.dashboard1",
                "plone.dashboard2",
                "plone.dashboard3",
                "plone.dashboard4"
            ]
        },
        {
            "name": "plone.app.querystring.field.Creator.description",
            "schema": {
                "properties": {
                    "description": "",
                    "factory": "Text",
                    "title": "Description",
                    "type": "string",
                    "widget": "textarea"
                }
            },
            "value": "The person that created an item"
        }
    ],
    "items_total": 2973
}

Updating registry records#

Updating an existing record:

http

PATCH /plone/@registry/ HTTP/1.1
Accept: application/json
Authorization: Basic YWRtaW46c2VjcmV0
Content-Type: application/json

{
    "plone.app.querystring.field.path.title": "Value"
}

curl

curl -i -X PATCH http://nohost/plone/@registry/ -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"plone.app.querystring.field.path.title": "Value"}' --user admin:secret

httpie

echo '{
  "plone.app.querystring.field.path.title": "Value"
}' | http PATCH http://nohost/plone/@registry/ Accept:application/json Content-Type:application/json -a admin:secret

python-requests

requests.patch('http://nohost/plone/@registry/', headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, json={'plone.app.querystring.field.path.title': 'Value'}, auth=('admin', 'secret'))

Example response:

HTTP/1.1 204 No Content