Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Property schemas

Describes the schemas for built-in properties in Optimizely Content Management System (CMS) (SaaS).

The standard primitive types in GraphQL includes types like String, Int, Boolean, DateTime and Float. The Optimizely Graph also include the type JSON. CMS then expands the property types with some additional types as described here.

Link

Link is a property that is used when a content item has a link to another content item. It is modeled in the CMS (SaaS) UI as a Content property of type LinkItem or Link Collection (or in integration API as a component with content type link, with optional format LinkCollection). The graph schema for Link is defined as:

PropertyTypeDescription
urlContentUrlThe URL representing the link.
titleStringThe title for the link.
textStringThe link text.
targetStringOptional setting that specifies how the link should be opened.

ContentReference

ContentReference is a property that is used when a content item has a reference to another content item. It is modeled in CMS UI as a Content property of type Content Reference (or in integration API as type contentReference). The graph schema for ContentReference is defined as:

PropertyTypeDescription
keyStringThe key to the referenced content instance.
urlContentUrlThe URL to the referenced content instance.

ContentUrl

ContentUrl is a property that is used to represent URLs for a content item. It is used for metadata, like _metadata.url, and for content type properties modeled in CMS UI as a Link of type URL (or in integration API as type URL). The graph schema for ContentUrl is defined as:

PropertyTypeDescription
typeStringDescribes the type for default value. Possible values are:


  • HIERARCHICAL – The path is based on the hierarchical structure of content within CMS (SaaS).

  • SIMPLE – The editor defined a simple address for the content item, which is used as the default URL.

  • SHORTCUT – The editor defined a shortcut for the content item. The default URL is to the content item referenced by the shortcut.

  • INTERNAL – The default URL is in internal format. This default is for blocks or components not intended to be addressed directly in an application.

  • EXTERNAL – The editor defined an external shortcut for the content item. The default URL is the external URL.

  • INACTIVE – The editor chose a shortcut to inactivate the content item. The default URL is empty.

defaultStringThe default URL for the content instance. The value is dependent on type. For media content items, the default value is an absolute URL with authority set to the CMS (SaaS) application.
hierarchicalStringThe path for the content item is based on the hierarchical structure within CMS (SaaS).
internalStringA permanent URL to the content item. This format is used within the integration API to reference content items.
baseStringThe authority for the content item. This is dependent on the application configuration with CMS (SaaS).

URL resolve

The URL for a content item is indexed in relation to the defined applications. If a content item does not belong to an application (that is, it is not under a StartPage for an application), then the hierarchical path will be resolved from the Root page, and there will be a language segment in the URL. There is no base for the URL.

If the content item belongs to an application (is located under a start page for an application), then the hierarchical path is resolved from that application's start page. The URL indexing will then select a host and base depending on the hosts defined for the application, given the locale of the current content item. If the selected host has a language mapping then is the language segment omitted from the hierarchical path.

The base for media items is the CMS (SaaS) application. So media is served from CMS (SaaS) (or mostly from the CDN in front of CMS (SaaS)).

RichText and SearchableRichText

RichText is a property that is used when a text property in the CMS (SaaS) UI is selected to be of type XHTML string (or a string property in integration API is defined with format html). In graph is a rich text property defined as either RichText or SearchableRichText dependent on the indexingType setting on the corresponding content type property. If the property is marked as searchable then SearchableRichText is used. Then the property's value will also be indexed to be included in free text searches. The graph schema for RichText and SearchableRichText is defined as:

PropertyTypeDescription
htmlStringThe rich text is in HTML format.
jsonJSONThe rich text in a slate-based JSON format.

Slate format

The JSON format for rich text is based on the slate format. It is based on nodes with a field type specifying which element type it is, with optional additional attributes describing the style. The leaf nodes are the actual text elements with a field text with the text value and optionally additional attributes describing the style of the text.