Skip to content

1.0.1 Polling Export Execution

As with the execution of the main report, you can also poll the execution of the export process. As of JasperReports® Server 5.6, this service supports the extended status value that includes an appropriate message.

Method

URL

GET

http://<host>:<port>/jasperserver[-pro]/rest_v2/reportExecutions/requestID/exports/
exportID/status

Options

Sample Return Value

accept: application/xml (default)

<status>ready</status>

accept: application/status+xml

<status>
    <errorDescriptor>
        <errorCode>input.controls.validation.error</errorCode>
        <message>Input controls validation failure</message>
        <parameters>
            <parameter>Specify a valid value for type Integer.</parameter>
        </parameters>
    </errorDescriptor>
    <value>failed</value>
</status>

accept: application/json

{ "value": "ready" }

accept: application/status+json

{
    "value": "failed",
    "errorDescriptor": {
        "message": "Input controls validation failure",
        "errorCode": "input.controls.validation.error",
        "parameters": ["Specify a valid value for type Integer."]
    }
}

Return Value on Success

Typical Return Values on Failure

200 OK – The content contains the export status, as shown above. In the extened format, error reports contain error messages suitable for display.

404 Not Found – When the specified request ID does not exist.

For example, to get the status of the HTML export in the previous example, use the following URL:

GET http://localhost:8080/jasperserver-pro/rest_v2/reportExecutions/912382875_1366638024956_2/exports/html/status

When the status is “ready” your client can download the new export output and any attachments as described in section Requesting Report Output. For example:

GET http://localhost:8080/jasperserver-pro/rest_v2/reportExecutions/912382875_1366638024956_2/exports/html/outputResource

GET http://localhost:8080/jasperserver-pro/rest_v2/reportExecutions/912382875_1366638024956_2/exports/html/images/img_0_46_0