Copying contents via REST
This document explains how to copy contents inside a repository to new target folders using the Document.One (D1) REST API.
Log in to D1 and open the repository where the contents to be moved are stored:
Select the content you want to move. Copy the content's technical ID:
Similarly, copy the technical ID of the target folder.
Go back to the landing page and click the API link under content access where the contents to be updated are stored:
The OpenAPI page opens, showing the available D1 endpoints.
Open the
/access.adx.content.test/v1/content/checkout
endpoint available under Versioning.Enter the content's technical ID into the contentId field:
Similarly, enter the technical ID of the target folder into the targetFolderId field.
Click Execute and check the response. A response with status
200
(success) is expected, meaning that the content is now checked out. At this point, a new version of the content is created, with a new content ID. Copy the new content ID from the message:Open the
/access.adx.content.test/v1/content/copy
endpoint available under Content. Click Try it out to activate the fields.Enter the new content technical ID into the contentId field.
Change other properties if required.
Click Execute and check the response. A response with status
200
(success) is expected, meaning that the content has been copied to the target folder. Check the content access again to verify this is the case.Open the
/access.adx.content.test/v1/content/checkin
endpoint available under Versioning.Paste the new content technical ID into the contentId field.
Click Execute. Your copied content is now saved with a new version, with the status
CURRENT
.
OpenAPI
For code samples, see