1. Content Management API

Data model

The following tables describe the schema and attributes used in XM Cloud Content.

Note

For guidance on API syntax, see Syntax.

Content types

The following table describes the schema for a content type.

Field typeDescriptionRequiredLimit
NameAn internal name used when managing the content type in XM Cloud Content.Yes40 characters
IDContent type identifier that must be unique per tenant. It must be alphanumeric, and can contain periods, underscores, and hyphens, but not spaces or other special characters. It cannot start with the word taxonomy. The ID cannot be media. Consecutive periods are not allowed. Once defined it cannot be changed.Yes40 characters
DescriptionDescription of the content type, displayed in the user interface.No256 characters
FieldsFields defined for the content type.N/A50 fields
SystemList of system attributes for a content item.N/AN/A
Note

The maximum number of content types per tenant is 150.

Content type fields

The following table describes the schema for content type fields.

Restricted words for field IDs

The following words are reserved and cannot be used as a field ID:

  • id
  • locale
  • name
  • ref
  • sysCreatedAt
  • sysCreatedBy
  • sysStatus
  • sysUpdatedBy
  • sysUpdatedAt
  • sysPublishedAt
  • sysPublishedBy
  • sysVersion

Field types

You can add any of the following fields to a content type.

Field typeDescriptionLimit
TextSingle line or multi-line text.50,000 characters
Rich textText with formatting. Rich text fields include text formatting. The value and the formatting are saved separately as JSON.200,000 characters
MediaRelated media items.50 items
Date timeISO 8601 format of date and time representation (year-month-day-time), for example, 2022-04-24T19:13:55. In the app, time is displayed as mm/dd/yyyy.N/A
NumberInteger.9223372036854775807
BooleanTwo options, such as the true or false states of a check box.N/A
ReferenceRelated content items.50 items
SelectRelated taxonomies.300 items
JSONValid JSON object.100,000 characters (excluding spaces and new line characters)

Content items

The following table describes the data model for content items.

Field nameDescriptionRequiredLimit
Content TypeIdID of the content type the item belongs to.YesN/A
NameThe name of the content item. The name displayed at the top of the page automatically changes to match what you type here.N/A1,000 characters
FieldsFields defined for the content item.N/A50 fields
SystemList of system attributes for a content item.N/AN/A
Note

The maximum number of content items is 100,000. To specify a content item ID, add it to the request; otherwise, it is auto-generated. You can only specify the content item ID using the APIs.

Locales

The following table describes the data model for locales. A locale is a culture code that consists of a two-letter language code and a two-letter region code, for example, the locale for American English is en-US and for British English is en-GB.

Field nameDescriptionRequiredLimit
IDID of the locale. You can retrieve the list of supported locales, by adding the supported attribute to the GET locales method.YesN/A
NameThe name of the locale. The name displayed in the Localization section of the content item's details page.N/A50 characters
Note

The maximum number of locales per tenant is 25.

Media items

The following media item formats are supported:

  • Spreadsheet (.csv, .xls and .xlsx)
  • Document (.doc, .docx, .txt, and .rtf)
  • Image (.gif, .jpeg, .jpg, .png, .tif, .tiff, .svg, .eps, and webp)
  • PDF (.pdf)
  • Presentation (.ppt and .pptx)

The following table describes the data model for media items.

Field typeDescriptionRequiredLimit
IDUnique identifier for the media item. It must be alphanumeric, and can contain periods, underscores and hyphens, but not spaces or other special characters. It cannot start with the word taxonomy. By default, the identifier is the same as the name. Once defined it cannot be changed.Yes256 characters
NameName of the media item. It can contain periods but cannot contain spaces or special characters. Defaults to Untitled if left blank.No1,000 characters
DescriptionDescription of the media item.No50,000 characters
FileFile object.N/A70 MB for image files.

200 MB for document files, such as PDFs.
SystemList of system attributes for a media item.N/AN/A
Note

The maximum number of media items is 250,000.

Taxonomies

The following table describes the data model for taxonomies.

Field typeDescriptionRequiredLimit
IDTaxonomy ID that must be unique across taxonomies and cannot start with the word taxonomy. It must be alphanumeric, and can contain underscores, and hyphens.Yes40 characters
NameName for the taxonomy, displayed in the app.Yes50 characters
Value IDValue ID that must be unique within a taxonomy. It must be alphanumeric, and can contain underscores and hyphens.Yes50 characters
Value NameName for the value within the taxonomy.Yes50 characters
Note

The maximum number of taxonomies is 300, and the maximum number of values within a taxonomy is 100.

System attributes

A response also includes the following system attributes:

AttributesDescription
LocaleThe locale assigned to the entity.
sourceLocaleThe locale of the primary content item.
PrimaryThe type of content item. A primary content item is the original content item that was localized to other locales.
TypeThe type of entity or operation (publish, unpublish).
VersionThe version of the entity.
StatusThe status of the entity.
CreatedByThe user who created the entity.
CreatedAtTime when the entity was created.
lastPublishProgressThe last publishing status of a content or media item. For items that have never been published, such as a newly created content item, the values will be null. The lastPublishProgress attribute includes the following sub-types
.type - indicates whether it is a Publish or Unpublish event. The values can be Publish/Unpublish.lastPublishProgress.status - Indicates the status of the last publishing event. Values: In Progress, Completed, Failed.lastPublishProgress.triggeredBy - indicates who triggered the last publishing or unpublishing event.lastPublishProgress.triggeredAt -indicates when the last publishing or unpublishing event was triggered.
PublishedByThe user who last published the entity.
PublishedAtTime when the entity was last published.
UpdatedByThe user who last modified the entity.
UpdatedAtTime when the entity was last modified.
Note

You cannot modify system attributes.

Field nameDescriptionRequiredLimit
NameName of the field.Yes40 characters
IDUser or system generated identifier of a field in the content type. It must be alphanumeric, with no spaces or other special characters (including underscores). You can use a period as long as it is not at the end of the ID.Yes40 characters
TypeType of field.YesN/A
RequiredBoolean field that defines whether a field is mandatory.N/AN/A
Help textSupplemental text explaining the purpose or use of a field. Text is displayed beneath the field.No100 characters
Note

The maximum number of fields per content type is 50.

Important

The ID must be unique per content type, and it cannot be changed after the content type has been saved.

If you have suggestions for improving this article, let us know!