Reports endpoint

A GET to /api/open/reports allows you to get a list of all the reports generated.

Requirements and Restrictions

  1. A user having the permission to execute api.
  2. The result contains the list of all the reports.
  3. It's possible to use pagination adding page and count params
  4. The page param is the number of the page to return, the count is the dimension of the page.
  5. If count is nil or 0 the default value will be 100, if page is nil or 0 the request will not be paginated.
  6. You can filter the result passing a template_name as query param having value the report templates name you want filtering on.
Figure 1. Example of reports all request

Example of reports all request

A GET to /api/open/reports/:id allows you to get the report having the id passed as path parameter.

Requirements and Restrictions

  1. A user having the permission to execute api.
  2. As last parameter of the path you need to specify the id of the report.
  3. The result will contain the report.
  4. In case the report with that id is not found you'll get a 404.
Figure 2. Example of reports/:id request

Example of reports/:id request

A GET to /api/open/reports/:id/files allows you to download the report having the id passed as path parameter.

Requirements and Restrictions

  1. A user having the permission to execute api.
  2. As middle parameter of the path you need to specify the id of the report.
  3. The report download will be triggered.
  4. In case the report with that id is not found you'll get a 404.
Figure 3. Example of reports/:id request

Example of reports/:id request

A POST to /api/open/reports allows you to create a new report.

Requirements and Restrictions

  1. A user having the permission to execute api.
  2. You need to pass as query param the report_template_id you want to create.
  3. In case the request is well formed return a 202 response with the id of the job is taking care of teh request.
Figure 4. Example of create report request

Example of create report request

A GET to api/open/reports/jobs/1/status allows you to get the create report job result.

Requirements and Restrictions

  1. A user having the permission to execute api.
  2. As parameter of the path you need to specify the id of the job.
  3. The result will contain the job status
Figure 5. Example of reports/:id request

Example of reports/:id request