/
[GET] /versions ([GET] /{objectId})

[GET] /versions ([GET] /{objectId})

/api/dms/objects/{objectId}/versions

Description

To retrieve the indexdata change and/or content change versions of a DMS object, send the request with the objectId of the DMS object.
The Versions of a DMS Object can be returned, if in enaio editor for a object type at least one of the following properties are activated:

  • Create index data history

  • Create document history

The List of versions is a mix out of indexdata changes and/or content changes, sorted by Modification Date from old to new.
The last version is has the system field system:versionNumber "CURRENT". This version is not restoreable because it is the currently visible version.

Content change Version entries have a content stream section in the JSON while Index data change Version have it not. The content stream section contains the same version Guid as the system field system:versionNumber.
The Guid can be used to fetch the document itself (content change version) or fetch all index data fields (index data change version).

Request
Method

GET

Request optional Query Parameter

  • objectTypeId (String): The objectTypeId for the object to be queried. This speeds up the query.

  • excludeIndexDataVersions (Boolean): If true, no index data change versions are included in the result. Default false.

  • excludeContentVersions (Boolean): If true, no content change versions are included in the result. Default false.

  • includeIndexData (Boolean): If true, index data of the mask fields are directly included in the result. This can massivly slow down the query. Default false.

Response
Format

JSON

Minimum Version

6.1.0

Request
Example

/api/dms/objects/109491/versions
/api/dms/objects/109491/versions?objectTypeId=262144
/api/dms/objects/109491/versions?objectTypeId=262144&excludeIndexDataVersions=true
/api/dms/objects/109491/versions?objectTypeId=262144&excludeContentVersions=true
/api/dms/objects/109491/versions?objectTypeId=262144&includeIndexData=true

Result
Example

{ "objects": [ { "properties": { "system:objectId": { "value": "109491" }, "system:lastModifiedBy": { "value": "RENE10" }, "system:baseTypeId": { "value": "DOCUMENT" }, "system:versionNumber": { "value": "39FEC10D06844B73BB0BCF63F845CD6B" }, "system:objectTypeId": { "value": "262238" }, "system:createdBy": { "value": "RENE10" }, "system:creationDate": { "value": "2020-12-08T18:33:14+01:00" }, "system:lastModificationDate": { "value": "2020-12-08T18:33:14+01:00" } } }, { "properties": { "system:objectId": { "value": "109491" }, "system:lastModifiedBy": { "value": "RENE10" }, "system:baseTypeId": { "value": "DOCUMENT" }, "system:versionNumber": { "value": "B106A0195410412C8B3341D5C128061D" }, "system:objectTypeId": { "value": "262238" }, "system:createdBy": { "value": "RENE10" }, "system:creationDate": { "value": "2020-12-08T18:33:14+01:00" }, "system:lastModificationDate": { "value": "2020-12-08T18:33:14+01:00" } }, "contentStreams": [ { "contentStreamId": "B106A0195410412C8B3341D5C128061D" } ] }, { "properties": { "system:objectId": { "value": "109491" }, "system:lastModifiedBy": { "value": "SCHMEISSEL" }, "system:baseTypeId": { "value": "DOCUMENT" }, "system:versionNumber": { "value": "B58E12CA780340C4AE3D098B4E3A1B3F" }, "system:objectTypeId": { "value": "262238" }, "system:createdBy": { "value": "SCHMEISSEL" }, "system:creationDate": { "value": "2023-04-17T13:39:03+02:00" }, "system:lastModificationDate": { "value": "2023-04-17T13:39:03+02:00" } } }, { "properties": { "system:objectId": { "value": "109491" }, "system:lastModifiedBy": { "value": "SENNEWALD" }, "system:baseTypeId": { "value": "DOCUMENT" }, "system:versionNumber": { "value": "CURRENT" }, "system:objectTypeId": { "value": "262238" }, "system:createdBy": { "value": "SENNEWALD" }, "system:creationDate": { "value": "2023-08-15T09:04:57+02:00" }, "system:lastModificationDate": { "value": "2023-08-15T09:04:57+02:00" } } } ], "numItems": 4, "hasMoreItems": false, "totalNumItems": 4 }

 

Related content