[GET] /schema
/api/dms/schema
Description | To retrieve the object definition in CMIS format. If the optional complete query parameter is set, the entire object definition is returned. If not, only the part which is visible for the current user is returned. It is possible to send an ETag-Header (If-None-Match) with the Base64-encoded lastModificationDate to this endpoint. If the headers match, only a 'HTTP 304 Not modified' is returned instead of the JSON. Then, the client can use the object definition from its own cache. |
---|---|
Request | GET |
Request optional Query Parameter |
|
Request optional Header |
|
Response Format | JSON |
Minimum Version | 3.0.0 |
Changelog |
|
Request |
|
Result | See below |
1. Introduction
The CMIS-based object definition can be retrieved using the endpoint GET /dms/schema.
In both cases, the object definition is returned in such a manner that the requesting client is fully operable with the returned section of the object definition. The following chapters present examples of JSON structures and tables in which all properties a described. The characteristic "required" implies that this property always exists, even if it takes the value null or its value is empty.
Query example
/api/dms/schema?complete=true|false
This example shows a URL request to the endpoint. A boolean value complete can be passed as query parameter. If this parameter is passed with the value true, all object types are returned—even those the user has no access rights to.
In addition, the client can send an If-None-Match header in which the object definition's date is passed as Base64-encoded value. If there is no newer version on the server, the message 'HTTP 304 not modified' is returned. This check ensures that object definitions are not sent and received, if they already exist on the server.
2. JSON-Header
In the object definition's JSON header, you can find general information about the object definition.
{
"lastModificationDate": "2018-02-20T11:38:39+02:00",
"systemVersion": "9.00-Beta1",
"objectTypes": [<see section 3>]
}
Property | Type | Required | Beschreibung |
---|---|---|---|
| DateTime | Ja | Date and time of the last change made in the object definition |
systemVersion | String | Ja | System version |
objectTypes | Array | Ja | See section 3 |
3. Properties of Object Types
Object types have the following properties in an object definition. All object types in an object definition are returned as a one-dimensional array. The parent-child relationship between object types is defined in the parentId property.
{
"id": "145263412",
"localName": "iArztbrief",
"localNamespace": "",
"displayName": "Arztbrief",
"baseId": "FOLDER",
"parentId": "",
"description": "",
"creatable": true,
"contentStreamAllowed": "notallowed",
"controllableACL": true,
"fulltextIndexed": true,
"icon": "231265412",
"allowedChildObjectTypeIds": ["6488115", "6488131"],
"fields": [<see section 4>]
}
Property | Type | Required | Description |
---|---|---|---|
| String | Yes | Unique identifier of the object type in the object definition |
| String | Yes | Unique internal name of the object type in the object definition |
| String | No | Currently not used in enaio® |
| String | Yes | Language-specific name of the object type used as display name in the client |
| Enum (String) | Yes | Possible values:
|
| String | No | The parent object type's id. Note that cabinets do not have a parentId. |
| String | No | Free-text description of the object type |
| Boolean | Yes | Specifies whether this object type can be created by a user |
| Enum | No | Specifies whether this object type can or must have content or is a 'document without pages' Possible values:
|
| Boolean | Yes | Currently not used in enaio® |
| Boolean | Yes | Specifies whether this object type is indexed for full-text search |
| String | No | The object type's icon id. The icon can be displayed together with a displayName. |
| Array | No | The insertable children object type to a folder or register. It is only available for folder and register |
| Array | Yes | See section 4 |
4. Properties of Fields of Object Types
The following properties have fields in an object type of an object definition. All fields of an object type are returned as a one-dimensional array. No presentational properties are currently defined. However, these properties can be retrieved using this native object definition endpoint in case a client should need presentational properties.
{
"id": "8885623",
"localName": "iLetterType",
"localNamespace": "",
"displayName": "Briefart",
"description": "Art des Arztbriefes",
"propertyType": "Table",
"cardinality": "Single",
"updatability": "readwrite",
"required": true,
"choices": [{
// Siehe Kapitel 5
}],
"choiceHierarchySeperator": "#",
"choiceIntermediateNodes": false,
"openChoice": false,
"classification": "mwd",
"fulltextIndexed": true,
"defaultValue": {
// Da Catalog -> Siehe Kapitel 5
// Bei anderen Datentypen kann dies hier auch ein String sein.
},
"columns": [{
// Siehe Kapitel 6
}],
"keyField": false,
"regex": ""
}
General Attributes
All property definitions have the following attributes:
Property | Type | Required | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String | Yes | Unique identifier of the field in the object definition | ||||||||||||||
| String | Yes | Unique internal name of the field in the object definition | ||||||||||||||
| String | No | Currently not used in enaio® | ||||||||||||||
| String | Yes | Language-specific name of the field used as display name in the client | ||||||||||||||
| String | No | Free-text description of the field | ||||||||||||||
| Enum (String) | Yes | Property type. Possible values:
| ||||||||||||||
| Enum (String) | Yes | Possible values:
| ||||||||||||||
| Enum (String) | Yes | Specifies whether this field is writeable.
| ||||||||||||||
| Boolean | No | The field is read-only if the object has been archived. | ||||||||||||||
| Boolean | No | The field is read-only after an initial value has been saved for it. | ||||||||||||||
| Boolean | No | The field is read-only if the current user is not an enaio superuser. | ||||||||||||||
| Boolean | Yes | Specifies whether this is a mandatory field | ||||||||||||||
| Boolean | No | Specifies whether this field can be used to restrict a query. | ||||||||||||||
| Boolean | No | Specifies whether this field can be used to order the results of a query. | ||||||||||||||
| List<PropertyChoice> | No | Specifies which choices the user has. See also section 5. | ||||||||||||||
| Boolean | No | true: In catalogs, it is possible to save values that are not part of the catalog. | ||||||||||||||
| List<String> | No | Declares the classifications this property belongs to.
| ||||||||||||||
| Boolean | No | Determines whether the values of this field are searchable through a fulltext search. | ||||||||||||||
| PropertyType | No | Pre-defined value which is used if the field has not taken a value yet. | ||||||||||||||
| Boolean | No | The field value is unique among all keyFields of this object type | ||||||||||||||
| String | No | A regular expression defined for this field. It can be used to validate the value of a field before saving |
Integer Property Definitions (digits (numeric))
Integer fields in enaio® can have additional a maxValue. If a minValue is required then a validationRegex could be used. In the enaio editor® can only a maxLength be specified. The DMS-Service calculate from it the maxValue.
Property | Type | Required | Description |
|
---|---|---|---|---|
| Integer | No | The maximum value allowed for this property | 2147483647 |
DateTime Property Definitions
DateTime fields in enaio® can have additional a resolution.
Property | Type | Required | Description |
---|---|---|---|
| Enum | No | This property can take the following values:
If it is not set or available, it is DateTime. |
Decimal Property Definitions (decimal numbers)
Decimal fields in enaio® can have additional a maxValue. If a minValue is required then a validationRegex could be used. In the enaio® editor can only a maxLength be specified. The DMS-Service calculate from it the maxValue.
Java display big double values in scientific representation. If a decimal numbers field has the maximum length of 15, in the JSON it will be written as 9.99999999999999E14 and a even longer number with maximum length of 20 is written as 1.0E20. At the moment enaio® is limitted to two decimal places which are not visible inside the maxValue. Therefore it is possible to add 0.99 to the maxValue. This will change in the future.
Property | Type | Required | Description |
---|---|---|---|
| Double | No | The maximum value allowed for this property |
String Property Definitions
String fields in enaio® can have additional a maxLength. In the enaio® editor the max length is limitted to 4000 characters.
Property | Type | Required | Description |
---|---|---|---|
| Integer | No | The maximum length (in characters) allowed for a value of this property. |
Table Property Definitions
Table fields in enaio® can have additional a columns property which is itself a list of properties.
Property | Type | Required | Description |
---|---|---|---|
| List<Property> | No | A List of property definitions for each column according their datatype. |
5. PropertyChoice of a Catalog Field
The following properties have the choice properties of a catalog field. No presentational properties are currently defined. However, these properties can be retrieved using this native object definition endpoint in case a client should need presentational properties.
{
"displayName": "Überweisung",
"value": "UBW",
"icon": "5563215412",
"choices": [{
"displayName": "Internist",
"value": "IUBW",
"icon": "5563215413"
},{
"displayName": "Chirugie",
"value": "CUBW",
"icon": "5563215414"
}]
}
Property | Type | Required | Description |
---|---|---|---|
displayName | String | Yes | Display name in the client's language |
value | PropertyType | Yes | Parameter (cannot be used for tables) |
icon | String | No | Icon used in addition to the display value |
choices | List<PropertyChoice> | No | A list of child choices. |