Modifying a Resource

The POST method on the resource service is used to modify a resource. If the resource has one or more file resources, they must be provided using a multipart request. A POST operates on the URL of an existing resource, otherwise it is identical to the PUT method for a new resource.

Method

URL

POST

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

Argument

Type/Value

Description

Resource
Descriptor

String

This parameter identifies the part with an XML resource descriptor in a multipart request. This is a required argument when using multipart requests.

Content-Type

Content

multipart/form-data

text/plain (in the first part)

application/octet-stream (for files)

A well-formed XML resourceDescriptor that fully describes the modified resource, including any locally defined resources. File resources are uploaded in separate parts.

Return Value on Success

Typical Return Values on Failure

201 Created – The body is XML containing the resourceDescriptor of the resource just modified.

An error if the resource cannot be modified for some reason.

Version: 
Feedback
randomness