Skip to main content
Report Queries

Print a report query.

The representational output format of the report query is controlled by HTTP Accept header. Four content types are presently supported:

POST
/gb/report/queries/print/{report_query_id}
  • text/csv
    • text/xml
    • application/vnd.ms-excel
    • application/json (default)

Queries that run successfully but result in 0 rows will return an HTTP 204 (No content) response from the API.

Query parameters are optional. If a specific parameter is required by the selected report query but not included in the request, a 422 Unprocessable Entity response will result. The required parameter will be documented within the HTTP 422 response payload.

This method requires the ReportQueries:Print permission to be associated with the role.

Authorizationstringheaderrequired

For accessing the API a valid token must be passed in all the queries in the 'Authorization' header.

A valid token is generated by the API and returned by the /authenticate method by supplying a valid username and password.

The following syntax must be used in the 'Authorization' header :

Bearer aaaaaa/bbbbbb.ccccccc.dddddd
report_query_idstringrequired

Report query to run

Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]*$
stringify_result_fields_flagenum<string>querydefault:yes

(Optional) If yes, numeric values in the result will be converted to strings when fetching.

If omitted, this behaviour will default to yes.

Available options: yes, no
Time-Zonestringheaderdefault:UTC

The timezone value can be given in several formats, none of which are case sensitive:

  • As a named time zone, such as 'Europe/Helsinki', 'US/Eastern', or 'MET'.
  • As a string indicating an offset from UTC of the form [H]H:MM, prefixed with a + or -, such as '+10:00', '-6:00', or '+05:30'. A leading zero can optionally be used for hours values less than 10;
Maximum string length: 100
Pattern: ^[a-zA-Z0-9\/\:\+\-\_]+$

Body

application/vnd.catch-e-api.v1+json

Report query parameters

bodyobject

Response

application/json

Success

bodystring