There are two operations on file resources:
• | Viewing the file resource details to determine the file format |
• | Downloading the binary file contents |
To view the file resource details, specify the URL and the file descriptor type as follows:
Method | URL | ||
GET | http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/file/resource | ||
Options | |||
accept: application/repository.file+json accept: application/repository.file+xml | |||
Return Value on Success | Typical Return Values on Failure | ||
200 OK – The response will the the file resource descriptor. | 404 Not Found – The specified resource is not found in the repository. |
The type attribute of the file resource descriptor indicates the format of the contents. However, you can also download the binary file contents directly, with the format indicated by the MIME content-type of the response:
Method | URL | ||
GET | http://<host>:<port>/jasperserver[-pro]/rest_v2/resources/path/to/file/resource | ||
Return Value on Success | Typical Return Values on Failure | ||
200 OK – The response content-type will indicate the MIME type of the binary contents. See for the list of MIME types that correspond to file resource types.
| 404 Not Found – The specified resource is not found in the repository. |
Recommended Comments
There are no comments to display.