[POST] /variants

[POST] /variants

/api/dms/objects/{objectId}/native/variants

Description

Within this endpoint a new variant can be created. The new variant will be returned as JSON.

Starting with version 5.4.0, please use the payload instead of the query parameter for objectTypeId, variantType and transferPlannedRetention.
The query parameter will be removed in version 6.0.0 and enaio 11.0.

Request Method

POST

Request Query Parameter (mandatory)

variantType (String): One of the constants 'main' for a new first level variant X (X.0.0), 'parallel' for a new second level variant Y (X.Y.0) or 'sub' for a new third level variant Z (X.Y.Z).

Request Query Parameter (optional)

objectTypeId (Integer): For performance reasons, the objectTypeId of the object can be provided.
transferPlannedRetention (Boolean): If true, then the planned retention of the source object is also applied to the new variant. Default is false.

Response Format

JSON

Minimum Version

3.1.0

Change log

  • 5.4.0: The query parameters objectTypeId, variantType and transferPlannedRetention can also be sent in the payload. See "Request Example form Version 5.4.0".

Request
Example

/api/dms/objects/4528/native/variants?objectTypeId=262168&variantType=main&transferPlannedRetention=true

Request
Example from
Version 5.4.0

{ "objects": [{ "properties": { "system:objectTypeId": { "value": "262245" }, "variantType": { "value": "main" }, "transferPlannedRetention": { "value": false } } }] }

Result
Example

{ "objects": [{ "properties": { "system:objectId": { "value": "89119" }, "system:objectTypeId": { "value": "262245" }, "system:variantVersion": { "value": "1.0.0" }, ... } }] }