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.
This should be the value in fileSessionKey in POST export/{format:exportformat}.

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
  • PDF
  • 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
string
Y The id of the dashboard if available  
dashboardPartID
string
Y The id of the dashboard part if available  
reportID
string
Y The id of the report if available  
draftID
string
Y The id of the draft if available  
reportPartID
string
Y The id of the report part if available  
filters
array of objects
Y An array of ReportFilterField objects  
fileSessionKey
string
Y The key of this specific session, it will be set to cookie <fileSessionKey>=true on success  
reportDefinition
string
Y The report definition if available  
dashboardDefinition
string
Y The dashboard definition if available  
dashboardPartIndex
string
Y The index of the dashboard part if available  
access_token
string
Y The authentication token  
current_tenant
string
Y 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/pdf HTTP/1.1

Request 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:

the file

The 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/email HTTP/1.1

Request 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
string
  The access token  
current_tenant
string (GUID)
  The id of the tenant  

Response

The file

Samples

POST /api/export/performanceStatisticsTrend HTTP/1.1

Request form (application/x-www-form-urlencoded):

access_token:123Abc..=
current_tenant:

Request form (application/json):

{
  "access_token" : "123Abc...",
  "current_tenant" : ""
}

Response:

the file

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_key HTTP/1.1

Response:

false