[POST] /restore

[POST] /restore

/api/dms/objects/{objectId}/actions/trash/restore

Description

Use this endpoint to restore an object from recycle bin to its original location if this is still present. In case the original location is not present the object is restored to the user tray. To restore the object including its children objects the query parameter restoreAll must be send with the value true. If the object is restored to the user tray, the response JSON contain the property "system:parentId" with the value "system:tray"

Request
Method

POST

Request optional Query Parameter

  • objectTypeId (String): The objectTypeId for the object to delete. This speed up the query.

  • restoreAll (Boolean): If true also all children objects will be restored in case a folder or register should be restored.

Response
Statuscodes

Success: HTTP 200

Defined Errors

  • 1001 (HTTP 404): Object not found.

  • 3000 (HTTP 422): The object could not be restored because it contains a key field which value is already used by another object.

  • 3003 (HTTP 500): Internal Server error. Please look at the enaio server job monitor for detailed information.

Minimum Version

5.3.0

Request
Example

/api/dms/objects/2563/actions/trash/restore

Result
Example

See 1.3 Result Format