Copying or Moving a Resource

The POST method on the resource service also has parameters to copy or move a resource. Both folders and individual resources can be copied or moved. The ID of the resource being copied or moved must be unique within the destination folder, otherwise the operation will fail. This implies that copying cannot be used to duplicate a resource within the same folder.

Method

URL

POST

http://<host>:<port>/jasperserver[-pro]/rest/resource/path/to/resource/?<argument>

Argument

Type/Value

Description

copyTo?

/path/to/folder

Destination folder in the repository.

moveTo?

/path/to/folder

Destination folder in the repository.

Return Value on Success

Typical Return Values on Failure

200 OK– The resource was successfully moved or copied.

An error if the resource cannot be moved or copied, for example if a resource with the same ID already exists in the destination folder.

Feedback