StructuredContentModel
| Key | Type | Description |
|---|---|---|
| id | string | Unique identifier of the structured content. |
| title | string | Title of the structured content. |
| content_body | ContentDetailsModel | Content body of the structured content. |
| labels | array | Labels associated with the structured content. |
| labels[group] | object | Label group associated with the structured content. |
| labels[group][id] | string | Unique identifier of the label group. |
| labels[group][name] | string | Name of the label group. |
| labels[values] | object | Selected values for label group. |
| labels[values][id] | string | Unique identifier of the label value. |
| labels[values][name] | string | Name of label value. |
| created_at | string | Date of creation of the structured content. |
| modified_at | string | Date of last modification of the structured content. |
| links | object | Links related to the structured content. |
| links[self] | string | URL to fetch structured content through the CMP Open API. |
{
"id": "ce54ce74e3c240d38ace1a37704acf67",
"title": "Some title",
"content_body": <content_body_of_the_structured_content>,
"labels": [
{
"group": {
"id": "123123",
"name": "Content Format"
},
"values": [
{
"id": "234234",
"name": "content format 1"
}
]
}
],
"created_at": "2022-09-28 12:49:00",
"modified_at": "2022-09-28 12:20:12",
"links": {
"self": "https://api.cmp.optimizely.com/v3/structured-contents/ce54ce74e3c240d38ace1a37704acf67"
}
}
ContentPreviewStructuredContentModel
| Key | Type | Description |
|---|---|---|
| id | string | Unique identifier of the structured content. |
| title | string | Title of the structured content. |
| content_body | ContentPreviewContentDetailsModel | Content body of the structured content. |
| created_at | string | Date of creation of the structured content. |
| modified_at | string | Date of last modification of the structured content. |
{
"id": "ce54ce74e3c240d38ace1a37704acf67",
"title": "Some title",
"content_body": <content_body_of_the_structured_content>,
"created_at": "2022-09-28 12:49:00",
"modified_at": "2022-09-28 12:20:12"
}
ContentDetailsModel
| Key | Type | Description |
|---|---|---|
| content_guid | string | Unique identifier of the content. |
| title | string | Title of the content. |
| template_guid | string or null | Template guid of the content. |
| root_content | boolean | This is true when the content is not embedded in another content through a content type reference field. |
| expired | boolean or null | Whether the content is expired or not. |
| expiry_datetime | string or null | Date on which the content expires. |
| content_type_guid | string | Unique identifier of the content type. |
| content_type_name | string | Name of the content type. |
| content_type | ContentTypeModel or null | Content type of the content. |
| latest_fields_version | LatestFieldsVersionModel | Latest fields version of the content. |
| source | string or null | Source of the content. |
| source_id | string or null | Source id of the content. |
| source_metadata | string or null | Source metadata of the content. |
| created_at | string | Date of creation of the content. |
| created_by | string | Unique identifier of the user who created the content. |
| updated_at | string | Date of last modification of the content. |
| updated_by | string | Unique identifier of the user who last modified the content. |
| links | object | Links related to the content. |
| links[self] | string | URL to fetch the content through the CMP Open API. |
| links[definition] | string | URL to fetch the content definitions through the CMP Open API. |
{
"content_guid": "ce54ce74e3c240d38ace1a37704acf67",
"title": "Some title",
"template_guid": null,
"root_content": false,
"expired": false,
"expiry_datetime": null,
"content_type_guid": "319d2fd89b554f66832550a9a57c04fc",
"content_type_name": "MyComponent",
"content_type": <content_type_of_the_content>,
"latest_fields_version": <latest_fields_version_of_the_content>,
"source": null,
"source_id": null,
"source_metadata": null,
"created_at": "2022-09-28T12:49:00",
"created_by": "61d3f5f0312bdb3fe531ba34",
"updated_at": "2022-09-28T12:49:00",
"updated_by": "61d3f5f0312bdb3fe531ba34",
"links": {
"definition": "https://api.cmp.optimizely.com/v3/structured-content/content-types/319d2fd89b554f66832550a9a57c04fc/versions/90e07ce2b5a94880b196c8acb3ecf783",
"self": "https://api.cmp.optimizely.com/v3/structured-content/contents/ce54ce74e3c240d38ace1a37704acf67"
}
}
ContentPreviewContentDetailsModel
| Key | Type | Description |
|---|---|---|
| content_guid | string | Unique identifier of the content. |
| title | string | Title of the content. |
| template_guid | string or null | Template guid of the content. |
| root_content | boolean | This is true when the content is not embedded in another content through a content type reference field. |
| expired | boolean or null | Whether the content is expired or not. |
| expiry_datetime | string or null | Date on which the content expires. |
| content_type_guid | string | Unique identifier of the content type. |
| content_type_name | string | Name of the content type. |
| content_type | ContentTypeModel or null | Content type of the content. |
| fields_version | FieldsVersionModel | Fields version of the content. |
| source | string or null | Source of the content. |
| source_id | string or null | Source id of the content. |
| source_metadata | string or null | Source metadata of the content. |
| created_at | string | Date of creation of the content. |
| created_by | string | Unique identifier of the user who created the content. |
| updated_at | string | Date of last modification of the content. |
| updated_by | string | Unique identifier of the user who last modified the content. |
{
"content_guid": "ce54ce74e3c240d38ace1a37704acf67",
"title": "Some title",
"template_guid": null,
"root_content": false,
"expired": false,
"expiry_datetime": null,
"content_type_guid": "319d2fd89b554f66832550a9a57c04fc",
"content_type_name": "MyComponent",
"content_type": <content_type_of_the_content>,
"fields_version": <fields_version_of_the_content>,
"source": null,
"source_id": null,
"source_metadata": null,
"created_at": "2022-09-28T12:49:00",
"created_by": "61d3f5f0312bdb3fe531ba34",
"updated_at": "2022-09-28T12:49:00",
"updated_by": "61d3f5f0312bdb3fe531ba34"
}
ContentTypeModel
| Key | Type | Description |
|---|---|---|
| content_type_guid | string | Unique identifier of the content type. |
| name | string | Name of the content type. |
| thumbnail_guid | string or null | Thumbnail guid of the content type. |
| component | boolean | Whether content type is a component or not. |
| description | string or null | Description of the content type. |
| disabled | boolean or null | Disabled status of the content type. |
| version | ContentTypeVersionModel | Version of the content type. |
| source | string or null | Source of the content type. |
| source_id | string or null | Source ID of the content type. |
| source_metadata | string or null | Source metadata of the content type. |
| created_at | string | Date of creation of the content type. |
| created_by | string | Unique identifier of the user who created the content type. |
| updated_at | string | Date of last modification of the content type. |
| updated_by | string | Unique identifier of the user who last modified the content type. |
| links | object | Links related to the content type. |
| links[self] | string | URL to fetch content type through the CMP Open API. |
| links[versions] | string | URL to fetch content type versions through the CMP Open API. |
{
"content_type_guid": "319d2fd89b554f66832550a9a57c04fc",
"name": "MyComponent",
"thumbnail_guid": null,
"component": false,
"description": "Some description",
"disabled": null,
"version": <version_of_the_content_type>,
"source": null,
"source_id": null,
"source_metadata": null,
"created_at": "2022-09-27T16:32:26",
"created_by": "61d3f5f0312bdb3fe531ba34",
"updated_at": "2022-09-27T16:32:40",
"updated_by": "61d3f5f0312bdb3fe531ba34",
"links": {
"self": "https://api.cmp.optimizely.com/v3/structured-content/content-types/319d2fd89b554f66832550a9a57c04fc",
"versions": "https://api.cmp.optimizely.com/v3/structured-content/content-types/319d2fd89b554f66832550a9a57c04fc/versions"
}
}
ContentTypeVersionModel
| Key | Type | Description |
|---|---|---|
| version_guid | string | Unique identifier of the version. |
| latest | boolean | Whether the version is latest. |
| expected_locales | array of strings | Expected locales of the version. |
| field_definitions | array containing any of ContentTypeFieldDefinition, LibraryAssetFieldDefinition, TextFieldDefinition, BaseFieldDefinition, DatetimeFieldDefinition, RichTextFieldDefinition, ChoiceFieldDefinition, NumberFieldDefinition | Field definitions of the version. |
| created_at | string | Date of creation of the version. |
| created_by | string | Unique identifier of the user who created the version. |
| links | object | Links related to the version. |
| links[self] | string | URL to fetch the version through the CMP Open API. |
| links[content_type] | string | URL to fetch content type through the CMP Open API. |
{
"version_guid": "90e07ce2b5a94880b196c8acb3ecf783",
"latest": true,
"expected_locales": ["en_US"],
"field_definitions": [<field_definitions_of_the_content_type_version>],
"created_at": "2022-09-28T12:16:14",
"created_by": "61d3f5f0312bdb3fe531ba34",
"links": {
"content_type": "https://api.cmp.optimizely.com/v3/structured-content/content-types/319d2fd89b554f66832550a9a57c04fc",
"self": "https://api.cmp.optimizely.com/v3/structured-content/content-types/319d2fd89b554f66832550a9a57c04fc/versions/90e07ce2b5a94880b196c8acb3ecf783"
}
}
LatestFieldsVersionModel
| Key | Type | Description |
|---|---|---|
| version_guid | string | Unique identifier of the version. |
| content_hash | string | Content hash of the version. |
| validation | object or null | Validation of the version. |
| validation[fields] | object or null | Validation of the fields. |
| validation[fields][*property_name] | object or null | Validation of the field. |
| validation[fields][*property_name][*property_name] | string | Error reason. Will be one of REQUIRED_FIELD_ABSENT, LIST_EMPTY, INVALID_STATE, INVALID_SELF_REF, MIN_NOT_MET, MAX_NOT_MET or PATTERN_ERROR |
| fields | object | Fields related to the version. |
| fields[*property_name] | array | Localized field values of the version. |
| fields[*property_name][<index>] | object | Localized field values of the version. |
| fields[*property_name][<index>][locale] | string | Locale of the field values. |
| fields[*property_name][<index>][field_values] | array containing any of NumberFieldValueModel, BooleanFieldValueModel, DatetimeFieldValueModel, TextFieldValueModel, RichTextFieldValueModel, LibraryAssetFieldValueModel, ContentFieldValueModel, ContentFieldValueExpandedModel, URLFieldValueModel, JSONFieldValueModel, ChoiceFieldValueModel, LocationFieldValueModel | Field values of the field. |
| source_id | string or null | Source id of the version. |
| source_metadata | string or null | Source metadata of the version. |
| created_at | string | Date of creation of the version. |
| created_by | string | Unique identifier of the user who created the version. |
{
"version_guid": "5a37dd4957994366b29fb885819fa1f3",
"content_hash": "ebc44b355f60640157b51918105d567322e29ded1e949ffecb5709b112cf847f995e5a6da5e4fcac8c64236d949b5d38",
"validation": {
"fields": {
"field_key_1": {
"value[0]": "INVALID_STATE"
}
}
},
"fields": {
"field_key_1": [
{
"locale": "en_US",
"field_values": [{}]
}
],
"field_key_2": [
{
"locale": "en_US",
"field_values": [{}]
}
]
},
"source_id": null,
"source_metadata": null,
"created_at": "2022-09-28T12:49:17",
"created_by": "61d3f5f0312bdb3fe531ba34"
}
NumberFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| num_value | number | Value of the field value. |
{
"order_index": null,
"num_value": 2
}
BooleanFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| bool_value | boolean | Value of the field value. |
{
"order_index": null,
"bool_value": true
}
DatetimeFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| datetime_value | string | Value of the field value. |
{
"order_index": null,
"datetime_value": "2022-09-28T12:16:41"
}
TextFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| text_value | string | Value of the field value. |
{
"order_index": null,
"text_value": "abc"
}
RichTextFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| rich_text_value | string | Value of the field value. |
{
"order_index": null,
"rich_text_value": "<p>some text</p>"
}
LibraryAssetFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| asset_type | string | Type of the asset (article, image, video, raw file, or structured_content). |
| asset_guid | string | Unique identifier of the GUID. |
| links | object or null | Links related to the field value. |
| links[self] | string | URL to fetch an asset through the CMP Open API. |
{
"order_index": null,
"asset_type": "image",
"asset_guid": "66ebb5440f6f11edb68eaee6808b7756",
"links": {
"self": "https://api.cmp.optimizely.com/v3/asset-urls/66ebb5440f6f11edb68eaee6808b7756"
}
}
ContentFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| embedded | boolean | Whether it is embedded or not. |
| content_guid | string | Unique identifier of the content. |
| content_url | string or null | URL of the content. |
{
"order_index": null,
"embedded": true,
"content_guid": "49d58696325d48cfbe9f1e77f882dc19",
"content_url": "/v3/structured-content/contents/49d58696325d48cfbe9f1e77f882dc19"
}
ContentFieldValueExpandedModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| embedded | boolean | Whether it is embedded or not. |
| content_guid | string | Unique identifier of the content. |
| content_url | string or null | URL of the content. |
| content_details | ContentDetailsModel | Details of the content. |
{
"order_index": null,
"embedded": true,
"content_guid": "49d58696325d48cfbe9f1e77f882dc19",
"content_url": "/v3/structured-content/contents/49d58696325d48cfbe9f1e77f882dc19",
"content_details": {}
}
URLFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| url | string | Url of the field value. |
{
"order_index": null,
"url": "https://abc.com"
}
JSONFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| json_value | object or array of any | Value of the field value. |
{
"order_index": null,
"json_value": {
"some_key": "some value"
}
}
ChoiceFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| choice_key | string | Choice key of the field value. |
{
"order_index": null,
"choice_key": "somekey"
}
LocationFieldValueModel
| Key | Type | Description |
|---|---|---|
| order_index | integer or null | Order index of the field value. |
| longitude | number | Longitude of the location. |
| latitude | number | Latitude of the location. |
{
"order_index": null,
"longitude": -77.0364,
"latitude": 38.8951
}
LocationDefaultValue
| Key | Type | Description |
|---|---|---|
| longitude | number | Longitude of the location. |
| latitude | number | Latitude of the location. |
{
"longitude": -77.0364,
"latitude": 38.8951
}
CoreFieldDefinition
| Key | Type | Description |
|---|---|---|
| key | string | Key of the field. |
| name | string | Name of the field. |
| is_list | boolean | Whether the field is a list. |
| is_required | boolean | Required status of the field. |
| need_internationalization | boolean | Whether the field needs internationalization. |
| min_list_length | integer or null | Minimum list length of the field. |
| max_list_length | integer or null | Maximum list length of the field. |
| field_type | string or null | Field type of the field (boolean, number, text-field, rich-text, datetime, library-asset, content-type, json, url, choice, location). |
| source_id | string or null | Source ID of the field. |
| source_metadata | string or null | Source metadata of the field. |
| order_index | integer or null | Order index of the field. |
| help_text | string or null | Help text of the field. |
| editor_metadata | object or array of any or null | Editor metadata of the field. |
{
"key": "anotherComponent",
"name": "another component",
"is_list": false,
"is_required": false,
"need_internationalization": false,
"min_list_length": 1,
"max_list_length": -1,
"field_type": "content-type",
"source_id": null,
"source_metadata": null,
"order_index": null,
"help_text": null,
"editor_metadata": null
}
ContentTypeFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| allowed_content_types | array of strings | Allowed content types of the field. |
| ref_type | string | Ref type of the field. |
| allow_ref_edit | boolean or null | Whether ref edit is allowed. |
| content_type_links | object or null | Content type links of the field. |
| content_type_links[*property_name] | object | Information related to the linked content type item. |
| content_type_links[*property_name][name] | string | Name of the item. |
| content_type_links[*property_name][url] | string | URL of the item. |
| default_value | string or null | Default value of the field. |
{
"core": <core_fields_of_the_field_definition>,
"allowed_content_types": [
"5291e00b990a45f1857adc024fd26620",
"8f124dbb63934c14833d594443a3f3ec"
],
"allow_ref_edit": true,
"ref_type": 2,
"content_type_links": {
"5291e00b990a45f1857adc024fd26620": {
"name": "Author",
"url": "/v3/structured-content/content-types/5291e00b990a45f1857adc024fd26620"
},
"8f124dbb63934c14833d594443a3f3ec": {
"name": "Book",
"url": "/v3/structured-content/content-types/8f124dbb63934c14833d594443a3f3ec"
}
},
"default_value": null
}
LibraryAssetFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| allowed_types | array of strings | Allowed types of the field. |
| default_values | array or null | Default values of the field. |
| default_values[][asset_type] | string | Type of the asset. |
| default_values[][asset_guid] | string | Unique identifier of the asset. |
{
"core": <core_fields_of_the_field_definition>,
"allowed_types": [
"article",
"image",
"video",
"raw_file",
"structured_content"
],
"default_values": null
}
TextFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| validation_pattern | string | Validation pattern of the field. |
| min_length | integer | Minimum length of the field. |
| max_length | integer or null | Maximum length of the field. |
| default_values | array of strings or null | Default values of the field. |
{
"core": <core_fields_of_the_field_definition>,
"validation_pattern": "ab.*",
"min_length": 1,
"max_length": 10,
"default_values": ["abc"]
}
BaseFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| base_type | string | Base type of the field (boolean, json, url, or location). |
| default_values | array containing any of LocationDefaultValue, booleans, strings, object or array of any or null | Default values of the field. |
{
"core": <core_fields_of_the_field_definition>,
"base_type": "url",
"default_values": null
}
DatetimeFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| min_date | string | Minimum date of the field. |
| max_date | string | Maximum date of the field. |
| default_values | array of strings or null | Default values of the field. |
{
"core": <core_fields_of_the_field_definition>,
"min_date": "1900-01-01T00:00:00",
"max_date": "2100-12-31T23:59:59",
"default_values": null
}
RichTextFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| min_visual_text_length | integer | Minimum length of the field. |
| max_visual_text_length | integer or null | Maximum length of the field. |
| default_values | array of strings or null | Default values of the field. |
{
"core": <core_fields_of_the_field_definition>,
"min_visual_text_length": 0,
"max_visual_text_length": -1,
"default_values": null
}
ChoiceFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| choices | object | Choices of the field. |
| choices[*property_name] | string | Choice of the field. |
| display_option | string or null | Display option of the choice field (dropdown, radio, tag, or checkbox). |
| default_values | array of strings or null | Default values of the field. |
{
"core": <core_fields_of_the_field_definition>,
"choices": {
"somechoice": "somechoice"
},
"display_option": "dropdown",
"default_values": null
}
NumberFieldDefinition
| Key | Type | Description |
|---|---|---|
| core | CoreFieldDefinition | Core field definition. |
| min_value | integer or null | Minimum number of the field. |
| max_value | integer or null | Maximum number of the field. |
| default_values | array of integers or null | Default values of the field. |
{
"core": <core_fields_of_the_field_definition>,
"min_value": null,
"max_value": null,
"default_values": null
}