About this resource

Representation of a paged collection of field definitions

Properties

Property Description Type
items One page of this paged collection, which is a subcollection of the complete collection. Collection of FieldDefinition 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

Method Name Select-key Resource type Description
GET self Provides a link to this resource.
GET first A link to the first page of this paged collection.
GET prev A link to the previous page of this paged collection.
GET next A link to the next page of this paged collection.
GET last A link to the last page of this paged collection.

Actions

Method Action Description Response codes
POST /fielddefinitions add Create a field definition
201 Request completed successfully. The header parameter 'Location' contains the location of the new field definition resource. The response body is a JSON object which contains the property "id" that corresponds to the newly created field definition resource id.
400 Bad request (in general)
403 Insufficient permissions

Examples

Creating a field definition (common attributes) When creating a field definition, the following attributes are common to all field definition types:
POST /fielddefinitions
{
	"name": "assetCost",
	"dataType": "numeric",
	"enabledLanguages": {
		"addOrUpdate": [
			"54DFBAA2-98A3-4480-A9B2-2AD582304E0B"
		],
		"remove": []
	},
	"indexed": false,
	"inlineStyle": "background: #F00",
	"isReadOnly": false,
	"isRequired": false,
	"labels": [
		{
			"languageId": "54DFBAA2-98A3-4480-A9B2-2AD582304E0B",
			"value": "Asset Cost"
		}
	],
	"languageMode": "multiple",
	"memberships": {
		"addOrUpdate": [],
		"remove": []
	},
	"scope": "recordContentGlobal",
	"sortIndex": 10,
	"tag": "<xml>some tag</xml>",
	"defaultValue": "default value",
	"resetToDefaultTriggers": [
		"onNewField",
		"OnLoad",
		"OnFieldChange
	],
	"resetToDefaultFields": [
		"f0a63fe8-5ffe-49c2-8198-b81976a1cce8",
		"3cf7281e-787d-4336-9827-990388017911",
		"6e9807ce-16bd-4960-bda1-b26327633896"
		],
	"validationTrigger": "always",
	"validation": "<ref:Now />",
	"validationErrorMessage": "validation error message",
	"storageMode": "logChanges"
}
Specifying the data type of the field definition is mandatory. The following data types are supported:
  • classificationList
  • date
  • dateTime
  • duration
  • html
  • hyperlinkList
  • json
  • languageList
  • multiLineText
  • numeric
  • optionList
  • recordLink
  • recordList
  • singleLineText
  • textList
  • time
  • userGroupList
  • userList
Some data types contain additional attributes that can be configured. The following examples show all available data type-dependent attributes for those field definition types that have any. For brevity, most of the the common attributes are omitted here.
Creating a classification list field definition
POST /fielddefinitions
{
	"name": "Classification List",
	"dataType": "classificationList",
	"acceptMultipleOptions": true,
	"defaultSelectionDisplayMode": "search",
	"linkRecordToSelectedClassifications": true,
	"filter": "<ref:text out='name=a*' />",
	"rootId": "e20968e3-eee7-4813-bba8-a8c8009ad531"
}
Creating a date field definition
POST /fielddefinitions
{
	"name": "Start Date",
	"dataType": "date",
	"datePattern": "d"
}
Creating a date/time field definition
POST /fielddefinitions
{
	"name": "Timestamp",
	"dataType": "datetime",
	"datePattern": "d",
	"dateTimePattern": "MMMM yyyy",
	"useUtc": true
}
Creating an html field definition
POST /fielddefinitions
{
	"name": "Control Body",
	"dataType": "html",
	"maximumLength": "40000",
	"minimumLength": "0",
	"regularExpression": ".*"
}
Creating a multiline text field definition
POST /fielddefinitions
{
	"name": "Text Block",
	"dataType": "multiLineText",
	"maximumLength": "40000",
	"minimumLength": "0",
	"regularExpression": ".*"
}
Creating a numeric field definition
POST /fielddefinitions
{
	"name": "Asset Cost",
	"dataType": "numeric",
	"accuracy": "0.001",
	"range": "0-100"
}
Creating an option list field definition
POST /fielddefinitions
{
	"name": "Asset Theme",
	"dataType": "optionList",
	"acceptMultipleOptions": false,
	"sortOrder": "label",
	"filter": "<ref:text out='name=a*' />",
	"items": {
		"addOrUpdate": [
			{
				"id": "0E1EBD21-5932-1234-B76B-A0C0C7924A1D",
				"name": "themeJungle",
				"labels": [
					{
						"languageId": "0E1EBD21-5932-4208-B76B-A0C0C7924A1D",
						"value": "Jungle"
					},
					{
						"languageId": "B5484390-1262-42CC-AFFD-B10BEEA23799",
						"value": "Robin des Bois"
					}
				],
				"tag": "<xml>some tag1</xml>",
				"disabledInDAMUI" : false
			},
			{
				"name": "themeYellow",
				"labels": [
					{
						"languageId": "0E1EBD21-5932-4208-B76B-A0C0C7924A1D",
						"value": "Yellow"
					},
					{
						"languageId": "B5484390-1262-42CC-AFFD-B10BEEA23799",
						"value": "Omelette du Fromage"
					}
				],
				"tag": "<xml>some tag2</xml>",
				"disabledInDAMUI" : false
			}
		],
		"remove": []
	}
}
Creating a record list field definition
POST /fielddefinitions
{
	"name": "Component List",
	"dataType": "recordList",
	"summaryFieldId": "E42AD166-9238-4271-8EC7-925C1B62F911"
}
Creating a single line text field definition
POST /fielddefinitions
{
	"name": "Text Line",
	"dataType": "singleLineText",
	"maximumLength": "40000",
	"minimumLength": "0",
	"regularExpression": ".*",
	"isUniqueIdentifier": false
}
Creating a time field definition
POST /fielddefinitions
{
	"name": "Text Line",
	"dataType": "singleLineText",
	"timePattern": "hh,mm:ss"
}
Creating a user list field definition
POST /fielddefinitions
{
	"name": "Text Line",
	"dataType": "userList",
	"filter": "<ref:text out='name=a*' />"
}
Creating a user group list field definition
POST /fielddefinitions
{
	"name": "Text Line",
	"dataType": "userGroupList",
	"filter": "<ref:text out='name=a*' />"
}