^ = Reporting Service: REST Interface
The base URL of the report service endpoint is http://<server>:<port>/<contextname>/resources/reports
.
Query report templates
GET /resources/reports?filter=enabled%3Dtrue&range=0-1&sort=+id
{
"total": 4,
"items": [{
"id": "atest",
"enabled": true,
"uploaded": true,
"title": "asdf",
"description": "",
"createdBy": "admin",
"createdAt": 1385381944090,
"modifiedBy": "admin",
"modifiedAt": 1410850250188,
"fileName": "default.zip"
},
{
"id": "s_default",
"enabled": true,
"uploaded": false,
"title": "default",
"description": "",
"createdBy": "",
"createdAt": 1410925051849,
"modifiedBy": "admin",
"modifiedAt": 1410924618000,
"fileName": "report.jrxml"
}]
}
Name | Default | Description |
---|---|---|
|
A filter query expression that allows to search for reports with special properties. Simple Query:
Simple Queries can be combined using
|
|
|
|
A comma separated list of property names prefixed by
|
|
|
This is a range expression to allow paging through the result list. The definition of the range expression is:
|
Create a report template
POST /resources/reports
Content-Type: application/json
<<JSON of the report template>>
// POST /resources/reports
// Content-Type: application/json
//
// {
// "id": "atest",
// "enabled": true,
// "title": "asdf",
// "description": ""
// }
303 See Other
Location: http://localhost:8080/resources/reports/atest
Upload a report template
POST /resources/reports/{id}
Content-Type: multipart/form-data; boundary=----BOUNDARY
------BOUNDARY
Content-Disposition: form-data; name="file"; filename="default.zip"
Content-Type: application/x-zip-compressed
BINARY DATA HERE
------BOUNDARY--
{"file":"default.zip","name":"default.zip","type":".zip"}
Get a report template
GET /resources/reports/{id}
// GET /resources/reports/atest
{
"id": "atest",
"enabled": true,
"uploaded": true,
"title": "asdf",
"description": "",
"createdBy": "admin",
"createdAt": 1385381944090,
"modifiedBy": "admin",
"modifiedAt": 1410850250188,
"fileName": "default.zip"
}
Change a report template
PUT /resources/reports/{id}
Content-Type: application/json
<<JSON of the report template>>
// PUT /resources/reports/atest
// Content-Type: application/json
//
// {
// "id": "atest",
// "enabled": false,
// "title": "Test",
// "description": "My Description"
// }
{
"id": "atest",
"enabled": false,
"uploaded": true,
"title": "Test",
"description": "My Description",
"createdBy": "admin",
"createdAt": 1385381944090,
"modifiedBy": "admin",
"modifiedAt": 1410850250188,
"fileName": "default.zip"
}
Delete a report template
DELETE /resources/reports/{id}
// DELETE /resources/reports/atest
204 No Content
Generate a report
GET|POST /resources/reports/{id}/generate{filename}?download=<true|false>&f=<format>&<additional report specific parameters>
If POST is used, the query parameters must be provided as URL form-encoded in the body of the request.
The response depends on the parameters, for example if a PDF file is generated.
GET /resources/reports/atest/generateReport.pdf?download=false&f=pdf&ids=0&dsurl=http://sampleserver/arcgis/rest/services/TestFeatures/FeatureServer/0
Name | Default | Description |
---|---|---|
|
A special part of the URL which is used to encode the filename shown in the download dialog. This is only relevant if the option download is true. |
|
|
|
Defines that a |
|
|
Defines the format of the generated report. You can generate other report formats by configuration. |
|
Any additional parameter appended to the URL is directly passed to the report generation process as parameter. |
Name | Description |
---|---|
|
A comma separated list of feature IDs.
It is provided as |
|
The data source URL.
It contains the features specified by the |
|
The language to use in the report.
It is passed as |