Content Definitions Manifest
Explains the importance of the content definitions manifest and how to configure it for Optimizely Content Definitions API.
A content definitions manifest contains all content definitions in one JSON document. The Optimizely Content Management System (CMS) application uses these definitions to allow users to create and manage content and it is typically updated during application startup or when the definitions have changed. You can keep this file with your application and place it under version control. The manifest primarily contains content types and related settings.
JavaScript SDK
To make syncing of the manifest file in a Node application more convenient, there is a Node CLI tool available. See Optimizely Content Delivery JavaScript SDKs and samples.
Export Content Definitions Manifest
If you have already defined content types in the admin user interface or previously defined them through code, you can export everything into one file. You can then make changes to this file and import it back to the application.
GET | /api/episerver/v3.0/contentmanifest |
---|
Example manifest file
{
"editorDefinitions": [
{
"dataType": "PropertyString",
"uiHint": "specialString",
"editor": "specialEditor"
}
],
"propertyGroups": [
{
"name": "Information",
"displayName": "Information",
"sortOrder": 10
}
],
"contentTypes": [
{
"id": "4ceccc18-6bd3-492c-be3e-257ee1366797",
"name": "ArticlePage",
"version": "1.5.0",
"baseType": "Page",
"editSettings": {
"available": true,
"displayName": "Article Page",
"description": "A page type for articles.",
"sortOrder": 10
},
"properties": [
{
"name": "Heading",
"dataType": "PropertyString",
"branchSpecific": true,
"editSettings": {
"displayName": "Heading",
"groupName": "Information",
"sortOrder": 1,
"hint": "specialString"
},
"validation": [
{
"name": "length",
"minimum": 3,
"severity": "error",
"errorMessage": "The heading must be at least 3 characters long"
}
]
}
]
}
]
}
The manifest is separated into different sections and each section is handled by a specific importer. Currently, Optimizely supports the following sections:
- Content types – see Content types
- Property Groups – see Property Groups.
- Editor definitions – see Editor Definitions.
- Language branches – see Language Branches.
Import Content Definitions Manifest
Imports a manifest containing definitions from the application. Import happens in a transaction per section, meaning that if one content type fails, all previous changes to other content types are rolled back. With the parameter continueOnError, you can control whether the next section in the manifest should continue being imported if the previous section failed.
Content types included in the manifest will honor Semantic versioning.
PUT | /api/episerver/v3.0/contentmanifest |
---|
Updated 7 months ago