About this resource

Representation of a content type.

Properties

Property Description Type
createdOn Gets the creation datetime in UTC time. datetime
defaultFileExtensions Gets the default file extensions that are registered on the content type. Collection of string items
fileConfiguration Information about the file configuration. Only used if FileMode is review website. FileConfiguration
fileMode Indicates what file mode the content type uses. This can be: "UploadFile", "NoFile" or "CreateFromUrl". string
id Gets the Id of this content type. guid
inheritableFields Gets the content type inheritable fields. ContentTypeInheritableFieldCollection
inheritanceConfiguration Gets the content type inheritance configuration. string (values: none, parent, custom)
inheritanceFieldId Gets the content type relation field id. guid
isManual Indicates if a content type is predefined or a manually created content type. boolean
isNoFile Indicates if a content type is a "no-file" content type or not. boolean
labels Gets the labels of this content type. ContentTypeLabelCollection
modifiedOn Gets the last modification datetime in UTC time. datetime
name Gets the name of this content type. string
parentId Gets the ParentId of this content type. Can be null when the content type is a root content type. guid
purpose Gets the description text of this content type. string
registeredFields Gets a list of fields registered on this content type. ContentTypeFieldCollection
titleConfiguration Gets the content type title configuration. TitleConfiguration

Relations

Method Name Select-key Resource type Description
GET self Provides a link to this resource.
GET parent select-ContentType: parent ContentType Gets the parent content type of this content type.
GET modifiedby select-ContentType: modifiedby User Gets or sets the user that last modified this resource.
GET createdby select-ContentType: createdby User Gets or sets the user that created this resource.

Actions

Method Action Description Response codes
PUT /contenttype/{contentTypeId:guid} edit Edits an existing content type
204 Request completed successfully
400 Bad request (in general)
403 Insufficient permissions
404 Content type not found
DELETE /contenttype/{contentTypeId:guid} delete Deletes an existing content type
204 Request completed successfully
403 Insufficient permissions
404 Content type not found

Examples

Reading a content type by name or by unique identifier
You can read a content type either by id or name.
GET /contenttype/?name={urlEncodedName} HTTP/1.1
accept: application/json
GET /contenttype/7dacae02724d4817a281333eb3df7bc9 HTTP/1.1
accept: application/json
{
  "id": "7dacae02724d4817a281333eb3df7bc9",
  "name": "Video",
  "purpose": "This is the default content type for managing video content.",
  "parentId": null,
  "parent": null,
  "isManual": false,
  "registeredFields": [
    {
      "fieldId": "6e9807ce16bd4960bda1b26327633896"
    },
    {
      "fieldId": "3cf7281e787d43369827990388017911"
    }
  ],
  "labels": [
    {
      "value": "Video",
      "languageId": "c2bd4f9bbb954bcb80c31e924c9c26dc"
    }
  ],
  "defaultFileExtensions": [
    "AVI",
    "MP4"
  ],
  "titleConfiguration": {
    "option": "Field",
    "fieldId": "355108addf4c49a9a718ab7a00ca2792"
  },
  "inheritanceConfiguration": "Custom",
  "inheritanceFieldId": "b44b8f2d64b04f1ab150acd100ea640a",
  "inheritableFields": [
    {
      "fieldId": "0998866684224253816eacd100ea3dc4"
    },
    {
      "fieldId": "64ee218414da428bbb1dacd200d37010"
    }
  ],
		  "fileMode": "CreateFromUrl",
		  "fileConfiguration": {
			  "urlFieldId": "8ea636ad4dcb49c599eeae6200aaa627",
			  "crawlLevelOption": "Fixed",
			  "maximumNumberOfPages": 100,
			  "crawlLevelValue": 3,
      "crawlLevelFieldId": "34d75a3ea0d54482aa94ae5c00c85718"
		  },
  "modifiedOn": "2019-12-17T10:27:03.4076939+01:00",
  "modifiedBy": null,
  "createdOn": "2019-12-17T10:27:03.4076939+01:00",
  "createdBy": null
}
Reading a content type with embedded resources
When reading a content type you can specify the 'accept' header value hal+json. All subresources are represented as links to those resources.
GET /contenttype/271ee18ad0884ecebfc3a3cd0069d759 HTTP/1.1
accept: application/hal+json
{
  "_links": {
    "parent": {
      "href": "/contenttype/7dacae02724d4817a281333eb3df7bc9/parent",
      "select-key": "parent"
    }
  },
  "id": "7dacae02724d4817a281333eb3df7bc9",
  "name": "Video",
  "purpose": "This is the default content type for managing video content.",
  "parentId": null,
  "isManual": false,
  "registeredFields": [
    {
      "fieldId": "6e9807ce16bd4960bda1b26327633896"
    },
    {
      "fieldId": "3cf7281e787d43369827990388017911"
    }
  ],
  "labels": [
    {
      "value": "Video",
      "languageId": "c2bd4f9bbb954bcb80c31e924c9c26dc"
    }
  ],
  "defaultFileExtensions": [
    "AVI",
    "MP4"
  ],
  "titleConfiguration": {
    "option": "Field",
    "fieldId": "355108addf4c49a9a718ab7a00ca2792"
  },
  "inheritanceConfiguration": "Custom",
  "inheritanceFieldId": "b44b8f2d64b04f1ab150acd100ea640a",
  "inheritableFields": [
    {
      "fieldId": "0998866684224253816eacd100ea3dc4"
    },
    {
      "fieldId": "64ee218414da428bbb1dacd200d37010"
    }
  ],
		  "fileMode": "CreateFromUrl",
		  "fileConfiguration": {
			  "urlFieldId": "8ea636ad4dcb49c599eeae6200aaa627",
			  "crawlLevelOption": "Fixed",
			  "maximumNumberOfPages": 100,
			  "crawlLevelValue": 3,
      "crawlLevelFieldId": "34d75a3ea0d54482aa94ae5c00c85718"
		  },
  "modifiedOn": "2019-12-17T10:27:03.4076939+01:00",
  "createdOn": "2019-12-17T10:27:03.4076939+01:00"
}
Editing a content type
Editing the name of a content type is only allowed if no records exist of that type.
Labels cannot be added or removed, but their value can be set or cleared. The languageId and value should always be specified. Explicitly specifying a null value clears the label.

Notes:
  • Default file extensions must be unique over all the content types. When trying to add a duplicate, the system will return an error response.
  • No-file content can only be enabled when the type is not used for any content items with added files.
    • When enabled, it will not be possible to add files to content items of this type.
    • Use this option for content types like articles, claims and other metadata-only content.
  • If the fileMode is "CreateFromUrl", the content type must a fileConfiguration. If the fileMode is not "CreateFromUrl", fileConfiguration can be null.
    • The crawlLevelOption can be either "Fixed" or "Field"
    • If crawlLevelOption is "Fixed", the crawlLevelValue field must be used and the crawlLevelFieldId field must not be used.
    • If crawlLevelOption is "Field", the crawlLevelFieldId field must be used and the crawlLevelValue field must not be used.
PUT /contenttype/31072990f5ec458a9145a7f9008c1404
{
  "name": "Images",
  "purpose": "Content type for images.",
  "parentId": "7dacae02724d4817a281333eb3df7bc9",
			"isNoFile": true,
  "registeredFields": {
    "addOrUpdate": ["f0558ea6ffe5453698ae35bc4c242e9a", "bc98956b9f044216a5c797fdb65b130e"],
    "remove": ["5a8dc47449c34fe282bdfcf268d47dd1"]
  },
  "labels": [
    {
      "languageId": "C2BD4F9B-BB95-4BCB-80C3-1E924C9C26DC",
      "value": "Image"
    },
    {
      "languageId": "1ED74A99-84CD-4A9C-BFEB-A4D000EC3275",
      "value": "Afbeelding"
    }
  ],
  "defaultFileExtensions": {
    "addOrUpdate": ["JPG", "JPEG", "TIFF"],
    "remove": ["BMP"]
  },
  "titleConfiguration": {
    "option": "Field",
    "fieldId": "355108addf4c49a9a718ab7a00ca2792"
  }
  "inheritanceConfiguration": "Custom",
  "inheritanceFieldId": "b44b8f2d64b04f1ab150acd100ea640a",
  "inheritableFields": {
    "addOrUpdate": ["f0558ea6ffe5453698ae35bc4c242e9a", "bc98956b9f044216a5c797fdb65b130e"],
    "remove": ["5a8dc47449c34fe282bdfcf268d47dd1"]
  },
  "fileMode": "CreateFromUrl",
  "fileConfiguration": {
    "urlFieldId": "8ea636ad4dcb49c599eeae6200aaa627",
    "crawlLevelOption": "Fixed",
    "maximumNumberOfPages": 100,
    "crawlLevelValue": 3,
    "crawlLevelFieldId": "34d75a3ea0d54482aa94ae5c00c85718"
  },
}
Deleting a content type
Deleting a content type is only allowed when no records exist of that type. Also, you cannot delete a predefined content type like 'Video'.
DELETE /contenttype/31072990f5ec458a9145a7f9008c1404