Skip to content
This repository was archived by the owner on Jan 12, 2021. It is now read-only.

Latest commit

 

History

History
154 lines (107 loc) · 5.02 KB

File metadata and controls

154 lines (107 loc) · 5.02 KB

ReportExportApi

All URIs are relative to http://localhost/

Method HTTP request Description
requestFile POST api/v2/reports/export/files.json_api Export all alerts for a set of reports to a file
sendToIntegration POST api/v2/reports/export/integrations.json_api Export all alerts on reports to an integration
showFileDetails GET api/v2/reports/export/files/{id}.json_api Show a single Exported Report

requestFile

ExportedReport requestFile(reportIds, requestedFormat, filter)

Export all alerts for a set of reports to a file

<p>An email will be sent to the calling user once the file is ready for download.</p> <p>The URL and filename attributes will be blank on create. When exporting is complete these attributes will be filled in and can be viewed using the show action.</p>

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.ReportExportApi;


ReportExportApi apiInstance = new ReportExportApi();
List<Integer> reportIds = Arrays.asList(56); // List<Integer> | An array of report IDs to export alerts for
String requestedFormat = "requestedFormat_example"; // String | The file format of the export. Valid values are csv, json, pdf
Map<String, String> filter = new HashMap(); // Map<String, String> | Params used to filter the alerts that will be exported
try {
    ExportedReport result = apiInstance.requestFile(reportIds, requestedFormat, filter);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ReportExportApi#requestFile");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
reportIds List<Integer> An array of report IDs to export alerts for
requestedFormat String The file format of the export. Valid values are csv, json, pdf [enum: csv, json, pdf]
filter Map<String, String> Params used to filter the alerts that will be exported [optional]

Return type

ExportedReport

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

sendToIntegration

Meta sendToIntegration(integrationId, reportIds, filter)

Export all alerts on reports to an integration

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.ReportExportApi;


ReportExportApi apiInstance = new ReportExportApi();
Integer integrationId = 56; // Integer | The ID of the integration to send the alerts to
List<Integer> reportIds = Arrays.asList(56); // List<Integer> | An array of report IDs
Map<String, String> filter = new HashMap(); // Map<String, String> | Params used to filter the alerts that will be exported
try {
    Meta result = apiInstance.sendToIntegration(integrationId, reportIds, filter);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ReportExportApi#sendToIntegration");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
integrationId Integer The ID of the integration to send the alerts to
reportIds List<Integer> An array of report IDs
filter Map<String, String> Params used to filter the alerts that will be exported [optional]

Return type

Meta

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json

showFileDetails

ExportedReport showFileDetails(id)

Show a single Exported Report

The URL provided is temporary and will expire shortly after the request. To download the exported file you will need to follow the URL provided.

Example

// Import classes:
//import io.evident.EspSdk.ApiException;
//import io.evident.api.ReportExportApi;


ReportExportApi apiInstance = new ReportExportApi();
Integer id = 56; // Integer | Exported Report ID
try {
    ExportedReport result = apiInstance.showFileDetails(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ReportExportApi#showFileDetails");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer Exported Report ID

Return type

ExportedReport

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/vnd.api+json
  • Accept: application/vnd.api+json