Copy / Move

Copying an object

To copy a content object send a POST request to the /@copy endpoint at the destinations url with the source object specified in the request body. The source object can be specified either by url, path, UID or intid.

http


If the copy operation succeeds, the server will respond with status 200 (OK) and return the new and old url of the copied object.

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "source": "http://localhost:55001/plone/front-page", 
    "target": "http://localhost:55001/plone/copy_of_front-page"
  }
]

Moving an object

To move a content object send a POST request to the /@move endpoint at the destinations url with the source object specified in the request body. The source object can be specified either by url, path, UID or intid.

http


If the move operation succeeds, the server will respond with status 200 (OK) and return the new and old url of the moved object.

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "source": "http://localhost:55001/plone/front-page", 
    "target": "http://localhost:55001/plone/folder/front-page"
  }
]

Copying/moving multiple objects

Multiple objects can be moved/copied by giving a list of sources.

http


If the operation succeeds, the server will respond with status 200 (OK) and return the new and old urls for each copied/moved object.

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "source": "http://localhost:55001/plone/front-page", 
    "target": "http://localhost:55001/plone/copy_of_front-page"
  }, 
  {
    "source": "http://localhost:55001/plone/newsitem", 
    "target": "http://localhost:55001/plone/copy_of_newsitem"
  }
]