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

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 let users create and manage content, and it is typically updated during application startup or when the definitions have changed. You can keep this file and place it under version control with your application. The manifest primarily contains content types and related settings.

JavaScript SDK

A Node CLI tool is available to make syncing the manifest file in a Node application more convenient. See Optimizely Content Delivery JavaScript SDKs and samples.

Export Content Definitions manifest

You can export everything into one file if you have defined content types in the admin user interface or previously defined them through code. You can then change 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 sections, and a specific importer handles each. Currently, Optimizely supports the following sections:

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, 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