[POST] /native

[POST] /native

End of Life

This query language is deprecated and should no longer be used. Please use the SQL based query language described in "Core API | [POST] /objects/search"
Beginning with version 6.0.0 this search will no longer be available.

Next to the SQL-based query language described in the "Core API | [POST] /objects" chapter, there is an enaio® native search endpoint. This endpoint described here is nearly equal to the query language of enaio® appconnector. Differences are highlighted here.

/api/dms/objects/search/native

Description

To search for objects in the ECM system in the JSON format of the legacy enaio® appconnector

Request
Method

POST

Request
Header

Content-Type: application/json

Response
Format

JSON

Response
Status Codes

Success: HTTP 200
In case one or more inserts/updates failed: HTTP 422

Minimum Version

3.0.0

Maximum
Version

5.x.y

Request
Example

{ "query": { "internalName": "dms_test", "fields": { "Vertragsbasis": { "value": "1" }, "Archivbeleg erzeugen": { "value": "1" } }, "result_config": { "fieldsschema_mode": "ALL", "pagesize": 100, "offset": 100, "maxhits": 500 } } }

Result
Example

See 1.3 Result Format

1. Addressing Objects in the Query

In many parts of the query, objects and fields must be addressed. For the query to be portable between multiple systems with the same object definition, it is recommended to always use internal names. It is also possible to use objectTypeId, dbName or display names, but they may differ between systems and languages. Using these will result in always having to check if all names in the query match the new object definition.

2. Conditions

The query syntax allows multiple conditions for different subjects:

  • Conditions on form fields

  • Conditions on system fields

  • Conditions on basic parameters

  • Condition groups

  • Conditions on table fields

  • Conditions on Fulltext

The most simple ones are conditions on form fields. In the following example there are two conditions in the "fields" section. The "fields" section maps a condition to a form field using the form field's internal name as key and and the value as condition value. If nothing else is specified, the condition must be equal to the condition value.

"fields": { "internalNameOfTheField": { "value": "valueOfTheCondition", "operand": "!=", "system": true|false } }

If the condition to be checked is not equal than an "operand" property can be set. The operand property can take the following values:

Operand

Description

Operand

Description

>

The values of all objects in the results must be greater than the condition value in that field.

>=

The values of all objects must be greater than or equal to the condition value in that field.

!=

The values of all objects must be different from the condition value in that field. Not available for Tablecontrols.

<

The values of all objects must be less than the condition value in that field.

<=

The values of all objects must be less than or equal to the condition value in that field.

NULL

The values of all objects must be must be empty that field.

NOT NULL

The values of all objects must be non-empty in that field.

IN

The values of all objects must be one of the specified values in that field. The value property is an array and not a string value.

NOT IN

The values of all objects must not be one of the specified values in that field. The value property is an array and not a string value.

For the operand IN and NOT IN, the JSON looks as follows:

"fields": { "internalNameOfTheField": { "value": ["1", "2", "3"], "operand": "IN", "system": true|false } }

If the condition addresses a system field instead of a field on the index data mask, one of the "system" properties must have the value true. For regular index data fields the "system" property can be omitted. A condition on a basic parameter can be defined as shown in the next example:

{ "query": { "baseparams": { "Creator": { "value": "DEMO" }, "Created": { "value": "1028114820000" }, "Modifier": { "value": "DEMO", "operand": "!=" } } } }

For conditions on basic parameters, there is an individual section in the query. Operators can also be used in conditions for basic parameters, just as in the regular index data field conditions.

End of life

The negate and isNull properties known from enaio® appconnector have been deprecated for long and replaced by the correct operand in the DMS service for enaio®.

Basic parameter conditions are deprecated. All basic parameter conditions can also be defined using system fields. Therefore, they are duplicated. Please use system fields instead of basic parameters.

In the following table, all basic parameters are listed with a description and the corresponding system field:

Basic Parameter

Possible values

Corresponding System Field

Description

Basic Parameter

Possible values

Corresponding System Field

Description

Creator

User name

system:createdBy

 

Created

Timestamp or ISO-Date

system:creationDate

 

Modifier

User name

system:lastModifiedBy

 

Modified

Timestamp or ISO-Date

system:lastModificationDate

 

Owner

User name

 

 

ArchiveState

ARCHIVED | ARCHIVABLE | NOT_ARCHIVABLE | NO_PAGES | REFERENCE

 

 

Archivist

User name

system:OBJECT_AVID

 

ArchiveDate

Timestamp or ISO-Date

system:OBJECT_AVDATE

 

Locked

User name

system:versionSeriesCheckedOutBy

 

HasVariants

true (Boolean)

 

 

Version

Integer

system:versionLabel

 

RetentionDate

Timestamp or ISO-Date

system:OBJECT_RETENTION

 

RetentionPlannedDate

Timestamp or ISO-Date

system:OBJECT_RETENTION_PLANNED

 

Links

Integer

system:OBJECT_LINKS

 

Medium

Integer

 

 

SystemID

Integer

system:OBJECT_SYSTEMID

 

ForeignID

Integer

system:OBJECT_FOREIGNID

 

DocumentPageCount

Integer

 

 

Register

true | false (Boolean)

 

 

MultiLocation

true

 

 

Signed

CURRENT | PREVIOUS

 

 

LoanedOut

true (Boolean)

 

 

If nothing else is specified, all conditions described so far are joined by an AND operator, i.e., Condition1 AND Condition2 AND BasicparameterCondition1 AND ...
In case a condition with a more complex structure is needed that can be joined by OR, condition groups can be defined.

{ "query": { "conditionGroups": [{ "operator": "AND", "conditionGroups" [{ "operator": "OR", "fields": { "internalNameOfTheField": { "value": "Test", "operand": "!=", "system": true|false }, "internalNameOfTheField2": { "value": "Other", "operand": "=", "system": true|false } } },{ "operator": "OR", "baseparams": { "Creator": { "value": "DEMO" }, "Created": { "value": "1028114820000", "operand": "<" }, } }] }] } }

Condition groups can also be nested. Each level can have its own operator to join the nested groups.
For conditions on index data table fields and index data radio buttons, more information is needed.

Condition on index data table field

"fields": { "internalNameOfTheTableField": { "type": "GRID", "columns": [{ "internalName": "internalNameOfTheColumn1", "type": "decimal" }, ... ] "rows": [ ["19.00"] ] "operand": ">" } }

First, the condition must have a type to tell the DMS service that this is a table field condition. Then the columns which are included in the condition must be specified inside of the columns property. Instead of the value property of other conditions, table field conditions have a rows property where per column exactly one value is allowed. A condition of more than one value, e.g., in a column must be present in different rows valueA and valueB can be achieved with condition groups and defining the table condition multiple times in separate confition groups. The same can be done like valueA or valueB must be present in one column. Then the condition group must have a OR-Operator.

Full-text conditions can be defined one per object type as show below. Please take care there is a elastic search fulltext engine installed and configured. Otherwise the search result in no results.

Fulltext-Condition

{ "query": { "objectTypeId": "3", "vtx_query": "Olaf", } }

In Fulltext searches there are three possible placeholder characters available:

Placeholder

Description

Placeholder

Description

*

For a random string

?

For one random character

~

Phonetic search

Please also note, that the Autostar-Configuration is taken into account of the users account configuration. If the user has configured a automatic * behind every search value then this is inserted also. The same for autostart infront and both, infront as well behind the search value.

3. Result Configuration

The second part of a query contains which fields should be present in the output JSON.

Condition on index data table field

"query": { "result_config": { "pagesize": 100, "offset": 0, "maxhits": 5000, "deny_empty": true, "normalize_values": false, "distinct": false, "fieldsschema_mode": "ALL", "childschema_mode": "ALL", "childfieldsschema_mode": "ALL", "export_depth": 3, "systemFields": 1, "registerContext": 1, "disableSearchGroups": 0, "followDocLink": 0, "garbageMode": 0, "fileProperties": 1, "rights": 1, "autostar": 0, "fieldsschema": [{ "internalName": "OBJECT_ID", "sort_order": "DESC", "sort_pos": 1, "system": trueThe number of result objects. If it is not set, this value is equal to maxhits }, ... ], "parents": [{ "internalName": "internalNameOfTheParentObjectType1", "fieldsschema": [{ "internalName": "internalNameOfParentField1" },{ "internalName": "internalNameOfParentField2" }, ... ] }] } }

The table below describes all of the shown result_configuration properties. The three properties fieldsschema, parents and childrenschema are described in Section 4.

Parameter

Type

Default

Description

Parameter

Type

Default

Description

pagesize

Integer

Null

The number of result objects. If it is not set, this value is equal to maxhits. If maxhits is also not set the default value is 500 objects.

offset

Integer

0

Indicates the number of result objects to be skipped at the beginning of the result list.

maxhits

Integer

500

The total number of result objects the server may query. The actual number of returned result objects is specified by the pagesize parameter.

deny_empty

Boolean

false

If this is true, empty fields of objects are not returned.

normalize_values

Boolean

false

No longer available. Date and Datetime formats are always returned in the ISO format.

fieldsschema

Object

Null

Indicates the object type fields that should be in the result object list if fieldsschema_mode is DEF. Also, the sorting of the result objects can be defined here.

distinct

Boolean

false

The result object list contains only the first field specified in the fieldsschema property and only distinct values of this field.

fieldsschema_mode

MIN | DEF | ALL

ALL

Defines which fields of the object type are returned:

  • MIN = Only basic parameters

  • DEF = As defined in the property fieldsschema

  • ALL = All fields are returned (Attention: This can result is a very large result list)

childschema_mode

REG | DOC | DEF | ALL

ALL

Defines which child object types are returned. This property is only applied if the export_depth property takes a values greater than 0:

  • REG = Only register object types are returned.

  • DOC = Only document object types are returned.

  • DEF = As defined in the property XXX

  • ALL =All fields are returned (Attention: This can result is a very large result list)

childfieldsschema_mode

MIN | DEF | ALL

MIN

Defines which fields of each child object type are returned:

  • MIN = Only basic parameters

  • DEF = As defined in the property fieldsschema

  • ALL = All fields are returned (Attention: This can result is a very large result list)

export_depth

Integer

0

Defines the level of export children. The default value is zero which results in no child objects are in the result set.

Attention: A high export_depth can result in a very large result list.

systemFields

Integer

1

If this value is 0, system fields which classify the object status are not returned.

registerContext

Integer

1

If this value is 0, document located directly inside the folder will not be added to the result list.

disableSearchGroups

Integer

0

If this value is 1, search groups are ignored on the server.

followDocLink

Integer

0

If this value is 1, reference documents are automatically resolved to the original document.

garbageMode

Integer

0

If this value is 1, only documents from the recycle bin are returned.

fileProperties

Integer

0

If this value is 1, content information is added to each result object:

  • Size in bytes

  • File extension

  • Mime type

rights

Integer

0

If this value is 1, access rights are added to each result object.

baseParameters

Integer

1

If this value is 1, the basic parameters are automatically added to each result object

objectInserts

Integer

0

If this value is 1, for registers and folders the number and kind of object types will be added to the result which can currently be added inside this folder or register.

autostar

Integer

0 | 1 | 2 | 3

Autostar configuration:

  • 0 = No autostar is added

  • 1 = An autostar is added before each string

  • 2 = An autostar is added before and after each string

  • 3 = An autostar after each string

fillLeadingZeros

Integer

0

In fields with the fillLeadingZeros property zeros are prepended to the actual value.

parents

Object

Null

Parent fields to be added to each result object. This property is similar to fieldsschema property, but used for parent object types.

4. fieldsschema, parentschema and childschema