Copying a Resource

Copying a resource uses the Content-Location HTTP header to specify the source of the copy operation. If any resource descriptor is sent in the request, it is ignored.

Method

URL

POST

http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/folder
?<parameters>

Parameters

Type/Value

Description

create
Folders

true|false

True by default, and the service will create all parent folders if they don't already exist. When set to false, the folders specified in the URL must all exist, otherwise the service returns an error.

overwrite

true|false

When true, the target resource given in the URL is overwritten even if it is a different type than the resource descriptor in the content. The default is false.

Options

Content-Location: {resourceSourceUri} - Specifies the resource to be copied.

Return Value on Success

Typical Return Values on Failure

201 Created – The request was successful and, for confirmation, the response contains the full descriptor of the resource that was just copied.

404 Not Found – When the {resourceSourceUri} is not valid.

Feedback