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
Actions
Method | Action | Description | Response codes | ||||||
---|---|---|---|---|---|---|---|---|---|
POST /fielddefinitions | add | Create a field definition |
|
Examples
Searching for field definitions
The parameters are specified as http headers.
GET /fielddefinitions HTTP/1.1 accept: application/hal+json filter: ModifiedOn in today sort: createdon page: 1 pageSize: 20
The parameters are specified as query string parameters.
GET /fielddefinitions?filter=ModifiedOn+in+today&sort=createdon&page=1&pagesize=10 HTTP/1.1
The parameters are specified as a combination of query string parameters and http headers.
GET /fielddefinitions?page=1&pagesize=10 HTTP/1.1 filter: ModifiedOn in today sort: createdon
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
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 link field definition
POST /fielddefinitions { "name": "Related Products", "dataType": "recordLink", "childClassifications": { "addOrUpdate": [ "E4EA127D-6B92-4417-BB8D-A922790B1ABA", "35C0807A-F46A-4D68-BC99-2E194D2255C3" ], "remove": [] }, "parentContentTypes": { "addOrUpdate": [ "Video" ], "remove": [] }, "linkClassifications": null, "childLabels":[{ "value":"Label for children", "languageID":"c2bd4f9b-bb95-4bcb-80c3-1e924c9c26dc" }], "parentLabels":[{ "value":"Label for parents", "languageID":"c2bd4f9b-bb95-4bcb-80c3-1e924c9c26dc" }], "linkType": "ManyParentsManyChildren", "showSummaryImage": false, "summaryFieldId": null }
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*' />" }