Core
IoT Platform v2.x
2

Export #

Exports a dashboard as a PDF or JPEG from a tenant index.

Returns an error if the dashboard does not exist or if the export fails.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/dashboard/:index/:id/export
Method: POST
Body:
{
  "type": "pdf",
  "timezone": "UTC",
  "locale": "fr-FR",
  "exportName": "My export"
}

Javascript #

kuzzle.query({
  controller: 'dashboard-builder/dashboard',
  action: 'export',
  index: '<index>',
  _id: '<dashboard-id>',
  body: {
    type: 'pdf', // or 'jpeg'
    timezone: 'UTC',
    locale: 'fr-FR',
    exportName: 'My export',
  },
});

Arguments #

ArgumentsTypeDescription
index
string
Index name where the dashboard exists.
_id
string
Unique identifier of the dashboard to export.

Body Properties #

ArgumentsTypeDescription
type
string
Export type, either pdf or jpeg.
timezone
string
Time zone of the export (e.g., UTC).
locale
string
Locale of the export (e.g., fr-FR).
exportName
string
Name of the export file.

Response #

The response contains the exported file as a binary stream.

Example Response #

The response is a binary file that can be downloaded. The file format depends on the type specified in the request (pdf or jpeg).