HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityLog In

Content Definitions Manifest

This topic explains the importance of the content definitions manifest and how to configure it for Content Definitions API.

A manifest contains all content definitions in one JSON document. The Optimizely application needs this document to run 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.

Available Content Definitions Manifest operations:

  • Export
  • Import

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/contentmanifestExports a manifest containing definitions from the application.

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

GET

get/api/episerver/v3.0/contenttypes/{id}

Gets the content type at the current location. See Content types.

Property groups

GET

get/api/episerver/v3.0/propertygroups/{name}

Gets a property group with the provided name. See Property Groups.

Editor definitions

GET

get/api/episerver/v3.0/editors/{dataType}/{uiHint}

Gets an editor definition identified by a type and an optional uihint. See Editor Definitions.

Import Content Definitions Manifest

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.

When content types are imported, Semantic versioning is honored.

PUT

put/api/episerver/v3.0/contentmanifest

Imports a manifest containing definitions from the application.


Did this page help you?