Getting resource descriptor of a file resource, using Rest v2

Hello,

I am trying to get the resource descriptor of a file using following link, However, it gives the actual file contents.

HTTP Method: GET

Link: http://localhost:8080/jasperserver-pro/rest_v2/resources/reports/JRXML1?j_username=jasperadmin&j_password=jasperadmin

However, for a report unit, the same command gets the resource descriptor

HTTP Method: GET

Link: http://localhost:8080/jasperserver-pro/rest_v2/resources/reports/UploadingReport?j_username=jasperadmin&j_password=jasperadmin

Output: 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<reportUnit>
    <creationDate>2019-02-27T18:21:24</creationDate>
    <description></description>
    <label>UploadingReport</label>
    <permissionMask>1</permissionMask>
    <updateDate>2019-02-27T19:41:09</updateDate>
    <uri>/reports/UploadingReport</uri>
    <version>5</version>
    <alwaysPromptControls>false</alwaysPromptControls>
    <controlsLayout>popupScreen</controlsLayout>
    <inputControlRenderingView></inputControlRenderingView>
    <jrxmlFileReference>
        <uri>/reports/JRXML1</uri>
    </jrxmlFileReference>
    <reportRenderingView></reportRenderingView>
</reportUnit>

What is the correct command to get the details of a File resource in terms of a resource descriptor?

Regards,

Jatin

jatin.bidaye_1's picture
Joined: Jan 7 2019 - 12:03am
Last seen: 8 months 3 weeks ago

1 Answer:

Hello,

add Accept: application/repository.file+json or Accept: application/repository.file+xml to your request headers.

Friendly User's picture
Joined: Oct 8 2009 - 5:59am
Last seen: 4 days 13 hours ago
Feedback
randomness