About this resource
Representation of a paged collection of ContentType items
Properties
Property | Description | Type |
---|---|---|
items | One page of this paged collection, which is a subcollection of the complete collection. | Collection of ContentType items |
page | The current page of this paged collection. | int32 |
pageSize | The current page size of this paged collection. | int32 |
skip | The current skip size of this paged collection. | int32 |
take | The current take size of this paged collection. | int32 |
totalCount | The total count of items in this paged collection, not just on the current page. | int64 |
Relations
Actions
Method | Action | Description | Response codes | ||||||
---|---|---|---|---|---|---|---|---|---|
POST /contenttypes | add | Create a content type |
|
Examples
Searching for content types
The parameters are specified as HTTP headers.
Note that the filter parameter for content types only supports a (partial) name value of the content type
GET /contenttypes HTTP/1.1 accept: application/hal+json filter: video page: 1 pageSize: 20
The parameters are specified as query string parameters.
GET /contenttypes?filter=video&page=1&pagesize=10 HTTP/1.1
List only content type basic info
The following endpoint only returns the basic information of a content type.
GET /contenttypes/info HTTP/1.1 accept: application/json
[ { "id": "1d793d990f8b43ab9c7905ba02f84ee7", "name": "Asset", "parentId": "5dc726d32eff446589817a9a514d5313" }, { "id": "5dc726d32eff446589817a9a514d5313", "name": "Record", "parentId": null } ]
Creating a content type
If you do not specify a parentId, it will automatically be set to the Record content type id.
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.
Note:
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.
Note:
- 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 have a fileConfiguration. See examples below. Use this option to allow for a review and approval cycle of a website.
POST /contenttypes { "name": "Image", "purpose": "Content type for images.", "parentId": "7dacae02724d4817a281333eb3df7bc9", "isNoFile": false, "registeredFields": { "addOrUpdate": ["5a8dc47449c34fe282bdfcf268d47dd1", "bc98956b9f044216a5c797fdb65b130e"] }, "labels": [ { "languageId": "C2BD4F9B-BB95-4BCB-80C3-1E924C9C26DC", "value": "Image" }, { "languageId": "1ED74A99-84CD-4A9C-BFEB-A4D000EC3275", "value": "Afbeelding" } ], "defaultFileExtensions": { "addOrUpdate": ["JPG", "JPEG", "TIFF"] }, "titleConfiguration": { "option": "Field", "fieldId": "355108addf4c49a9a718ab7a00ca2792" }, "inheritanceConfiguration": "Custom", "inheritanceFieldId": "b44b8f2d64b04f1ab150acd100ea640a", "inheritableFields": { "addOrUpdate": ["0998866684224253816eacd100ea3dc4", "64ee218414da428bbb1dacd200d37010"] }, "fileMode": "CreateFromUrl", "fileConfiguration": { "urlFieldId": "8ea636ad4dcb49c599eeae6200aaa627", "crawlLevelOption": "Fixed", "maximumNumberOfPages": 100, "crawlLevelValue": 1, "crawlLevelFieldId": "34d75a3ea0d54482aa94ae5c00c85718" }, }
Specifying the option type of the title configuration is mandatory. The following options are supported:
The following examples show all available option-dependent attributes.
- Field
- FileName
The following examples show all available option-dependent attributes.
Specify a title configuration using a field
POST /contenttypes { "name": "Image", "purpose": "Content type for images.", "titleConfiguration": { "option": "Field", "fieldId": "355108addf4c49a9a718ab7a00ca2792" } }
Specify a title configuration using the filename of the latest master file
POST /contenttypes { "name": "Image", "purpose": "Content type for images.", "titleConfiguration": { "option": "FileName", "showExtension": true } }
Options for fileMode
The available options for fileMode are "UploadFile", "NoFile" and "CreateFromUrl". The default option is "UploadFile".
If fileMode is set to either "NoFile" or "CreateFromUrl", defaultFileExtensions cannot be used.
If fileMode is set to "CreateFromUrl", the titleConfiguration must use the option "Field", see example above.
If the fileMode is not "CreateFromUrl", fileConfiguration can be null. The options for fileMode are "UploadFile", "NoFile" and "CreateFromUrl". The default fileMode is "UploadFile".
- For fileConfiguration, 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.
Specify a fileConfiguration using a fixed value for crawl level
If you wish to have a content type used to generate a pdf from a website, fileMode must be set to "CreateFromUrl". The "urlFieldId" must be the id of a Hyperlink field.
If you want the crawl level used to be a fixed value, you can use the following example structure:
If you want the crawl level used to be a fixed value, you can use the following example structure:
POST /contenttypes { "name": "WebsitePDF", "fileMode": "CreateFromUrl", "fileConfiguration": { "urlFieldId": "8ea636ad4dcb49c599eeae6200aaa627", "crawlLevelOption": "Fixed", "maximumNumberOfPages": 100, "crawlLevelValue": 1 } }
Specify a fileConfiguration using a field for crawl level
If you wish to have a content type used to generate a pdf from a website, fileMode must be set to "CreateFromUrl". The "urlFieldId" must be the id of a Hyperlink field.
If you want a user to be able to choose crawl level when creating a record, you can use the following example structure. The value of the crawl level can then be set to a number between 1 and 3.
If you want a user to be able to choose crawl level when creating a record, you can use the following example structure. The value of the crawl level can then be set to a number between 1 and 3.
POST /contenttypes { "name": "WebsitePDF", "fileMode": "CreateFromUrl", "fileConfiguration": { "urlFieldId": "8ea636ad4dcb49c599eeae6200aaa627", "crawlLevelOption": "Field", "maximumNumberOfPages": 100, "crawlLevelFieldId": "34d75a3ea0d54482aa94ae5c00c85718" } }