Export APIs
Summary
API | Purpose | Usage in Izenda Front-end |
---|---|---|
POST export/{format:exportformat} | Exports the dashboard, report or report part specified in request parameters. | Report List > Expand a report > Export |
POST export/email | Emails or exports report/dashboard based on the input subscription parameter. | |
POST export/performanceStatisticsTrend | Exports the performance statistics trend to csv. | |
GET export/checkExportStatus/{fileSession} |
Returns true if the export has been completed for the specified fileSession. New in version 2.0.6. |
- Report List > Expand a report > Export - Report Designer > Export - Report Viewer > Export |
POST export/{format:exportformat}
Exports the dashboard, report or report part specified in request parameters.
Request
Parameters:
- Word
- Excel
- CSV
- XML
- HTML
- JSON
- Query Execution
- Definition (New in version 2.8.0)
Keys:
This API accepts 2 types of data:
- The application/x-www-form-urlencoded type with the following keys:
Field NULL Description Note dashboardID
stringY The id of the dashboard if available dashboardPartID
stringY The id of the dashboard part if available reportID
stringY The id of the report if available draftID
stringY The id of the draft if available reportPartID
stringY The id of the report part if available filters
array of objectsY An array of ReportFilterField objects fileSessionKey
stringY The key of this specific session, it will be set to cookie <fileSessionKey>=true on success reportDefinition
stringY The report definition if available dashboardDefinition
stringY The dashboard definition if available dashboardPartIndex
stringY The index of the dashboard part if available access_token
stringY The authentication token current_tenant
stringY The id of the current tenant if available
- The application/json type with the request payload is an ExportRequest object.
Response
The content of the export
Samples
POST/api/export/pdfHTTP/1.1Request form (application/x-www-form-urlencoded):
url:http://localhost:8888/report/view/e09f9d45-b721-4012-b8e7-c31c58d52af3 reportId:e09f9d45-b721-4012-b8e7-c31c58d52af3 filters:[] draftId:f862931f-f897-4f98-ab13-687b79b91806 tenantId: fileSessionKey:e09f9d45-b721-4012-b8e7-c31c58d52af3294 access_token:123Abc..= current_tenant:Request form (application/json):
{ "reportId":"e09f9d45-b721-4012-b8e7-c31c58d52af3", "filters": [ {"key": "EF8414A4-AAC0-46BA-B29B-AC7D2775EBE3", "value": "Argentina", "operatorId": "737307D1-1E5F-407F-889F-1B3C9A66DD6F"}, {"key": "204142B3-0BCF-4B3D-A834-D5E531CFDD2F", "value": 1, "operatorId": "737307D1-1E5F-407F-889F-1B3C9A66DD6F"} ] }Response:
thefileThe cookie will be set:
e09f9d45-b721-4012-b8e7-c31c58d52af3294=true
POST export/email
Emails or exports report/dashboard based on the input subscription parameter.
Request
Payload: a Subscription object
Response
- true if successful
- false if not
Samples
POST/api/export/emailHTTP/1.1Request payload:
{"reportId":"e09f9d45-b721-4012-b8e7-c31c58d52af3","deliveryType":"Email","deliveryMethod":"link","exportAttachmentType":"Pdf","emailSubject":"{reportName}","emailBody":"Dear,<br><br>Please open report by clicking on the following link.<br><br>{reportLink} <br><br>Regards,<br>{currentUserName}","recipients":"jdoe@acme.com","additionalRecipients":""}Sample response:
true
POST export/performanceStatisticsTrend
Exports the performance statistics trend to csv.
Request
Keys:
Field NULL Description Note access_token
stringThe access token current_tenant
string (GUID)The id of the tenant
Response
The file
Samples
POST/api/export/performanceStatisticsTrendHTTP/1.1Request form (application/x-www-form-urlencoded):
access_token:123Abc..= current_tenant:Request form (application/json):
{ "access_token" : "123Abc...", "current_tenant" : "" }Response:
thefile
GET export/checkExportStatus/{fileSession}
Returns true if the export has been completed for the specified fileSession.
This should be the value in fileSessionKey in POST export/{format:exportformat}.
New in version 2.0.6.
Request
No payload
Response
- true if the export has been completed
- false if not
Samples
GET/api/export/checkExportStatus/my_file_session_keyHTTP/1.1Response:
false