/
[GET] /schema

[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
Method

GET

Request optional Query Parameter

  • complete (Boolean): The entire object definition is returned and not only the part the current user is allowed to see

Request optional Header

  • If-None-Match (String): Base64 string of the lastModificationDate from the JSON result to optimize the result payload.

  • Accept-Language (Locale): The locale in which the schema should be return. Example: de-DE, en-US, fr-FR. Default is de-DE if this header is not set.

Response Format

JSON

Minimum Version

3.0.0

Changelog

  • 6.0.0: Accept-Language Header introduced

Request
Example

/api/dms/schema

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

Property

Type

Required

Beschreibung

lastModificationDate

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

Property

Type

Required

Description

id

String

Yes

Unique identifier of the object type in the object definition

localName

String

Yes

Unique internal name of the object type in the object definition

localNamespace

String

No

Currently not used in enaio®

displayName

String

Yes

Language-specific name of the object type used as display name in the client

baseId

Enum (String)

Yes

Possible values:

  • folder

  • register

  • document

  • relationship

  • rendition

parentId

String

No

The parent object type's id. Note that cabinets do not have a parentId.

description

String

No

Free-text description of the object type

creatable

Boolean

Yes

Specifies whether this object type can be created by a user

contentStreamAllowed

Enum

No

Specifies whether this object type can or must have content or is a 'document without pages'

Possible values:

  • notallowed

  • allowed

  • required

controllableACL

Boolean

Yes

Currently not used in enaio®

fulltextIndexed

Boolean

Yes

Specifies whether this object type is indexed for full-text search

icon

String

No

The object type's icon id. The icon can be displayed together with a displayName.

allowedChildObjectTypeIds

Array

No

The insertable children object type to a folder or register. It is only available for folder and register
types. For a specific instance of a folder or register use the /dms/objects/{id} endpoint.

fields

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

Property

Type

Required

Description

id

String

Yes

Unique identifier of the field in the object definition

localName

String

Yes

Unique internal name of the field in the object definition

localNamespace

String

No

Currently not used in enaio®

displayName

String

Yes

Language-specific name of the field used as display name in the client

description

String

No

Free-text description of the field

propertyType

Enum (String)

Yes

Property type. Possible values:

  • datetime

  • integer

  • decimal

  • string

  • boolean

  • user

  • table

  • static

cardinality

Enum (String)

Yes

Possible values:

  • single
    This property can take exactly one or no value. If the property is set to required, then it must take exactly one value.

  • multi
    This property can take several values or no value. If the property is set to required, then it must take at least one value.
    Note: In Java this value is a set.

updatability

Enum (String)

Yes

Specifies whether this field is writeable.
Possible values:

  • readonly
    The field is always read-only.

  • readwrite
    The field is always writeable.

  • oncreate
    The field is only writeable upon creation. If the object is modified at a later point in time, it is read-only.

readonlyArchived

Boolean

No

The field is read-only if the object has been archived.

readonlyInitialized

Boolean

No

The field is read-only after an initial value has been saved for it.

readonlySuperUser

Boolean

No

The field is read-only if the current user is not an enaio superuser.

required

Boolean

Yes

Specifies whether this is a mandatory field

queryable

Boolean

No

Specifies whether this field can be used to restrict a query.
Currently not used in enaio®

orderable

Boolean

No

Specifies whether this field can be used to order the results of a query.
Currently not used in enaio®

choices

List<PropertyChoice>

No

Specifies which choices the user has. See also section 5.

openChoice

Boolean

No

true: In catalogs, it is possible to save values that are not part of the catalog.
false: The user can only choose values from the catalog.
The default value is false.

classification

List<String>

No

Declares the classifications this property belongs to.
This is a information for a client which values can a field have, that he can display the right visualisation. The Server don't care about them.
For enaio there are the following classifications based on the object definition:

Value

Description

L, R

Left / Right limitation

A, S, F

For Patient in medical environment

M, W, F

For Gender

J, N

Yes / No limitation

Letter

Only Letters are allowed

LeadingZeros

Leading zeros should be shown before the value up to the length of the field.

fulltextIndexed

Boolean

No

Determines whether the values of this field are searchable through a fulltext search.

defaultValue

PropertyType

No

Pre-defined value which is used if the field has not taken a value yet.
Currently not specified. The characteristics of this value may change. CURRENT_DATE, CURRENT_TIME, KATALOGWERT, etc. have not been defined yet, e.g., ${CURRENT_USER}

keyField

Boolean

No

The field value is unique among all keyFields of this object type

validationRegex

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

 

Property

Type

Required

Description

 

maxValue

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

Property

Type

Required

Description

resolution

Enum

No

This property can take the following values:

  • year (A query will return a numeric value, e.g., 1990.)

  • date (A query will return a date value, e.g., "1990-01-01")

  • time (A query will return a DateTime value, e.g., "22:21:20")

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

Property

Type

Required

Description

maxValue

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

Property

Type

Required

Description

maxLength

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

Property

Type

Required

Description

columns

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

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.

 

 

Related content