HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Property format

Describes the Property format resource and how to work with them.



Optimizely SaaS Core is in beta. Apply on Join the waitlist for SaaS Core or contact your Customer Success Manager.

A property format is a set of rules that apply to a content type property. It can define validation rules, which editor to use, and settings for that editor.

A property format is associated with a specific data type.

The available property formats are limited to formats defined by Optimizely Content Management System (CMS) and cannot be modified.

The property format resource contains the following fields:

KeykeyA string identifying the property group in the API.
Data typedataTypeThe data type that this format can be applied to. Must be one of the data types. See [Link to data types].
Display namedisplayNameA user-friendly name for the group that is displayed to end users.
EditoreditorA relative index used in some listings to define the order of property groups.

Pre-defined formats

The following formats represents pre-defined behaviors in the system. You can assign these to a content type property when such a behavior is preferable.

KeyData typeDescription
htmlstringIndicates that the HTML editor should be used to edit the property.
urlstringIndicates that the string must be a vaid URI and that the URL selector should be used when editing the string.
selectOnestringIndicates that the string should be one of a list of pre-defined values.
selectManystringIndicates that the string should be one or more values of a list of pre-defined values.

Work with property formats

List property formats

Retrieve a list of all property formats through the Property Format API.

GET https://example.com/_cms/v1/propertyformats
        "key": "html",
        "dataType": "string",
        "displayName": "HTML",
        "editor": "tinyMCE"
        "key": "switch",
        "dataType": "boolean",
        "displayName": "Switch",
        "editor": "bool-switch"

Get a property format

Retrieve a specific property format through the Property Format API using its unique key.

GET https://example.com/_cms/v1/propertyformats/html
    "key": "html",
    "dataType": "string",
    "displayName": "HTML",
    "editor": "tinyMCE"