Kestra Plugin Export

Kestra Plugin Export

Certified

Export a dashboard's chart data to file(s)

Exports one or every non-Markdown chart of a Kestra dashboard to internal storage, ready to be attached to a report, e.g. by email. Defaults to the current tenant's default dashboard and CSV format.

yaml
type: io.kestra.plugin.kestra.dashboards.Export

Export a dashboard chart to CSV and email it as a weekly report.

yaml
id: weekly_compliance_report
namespace: company.team

tasks:
  - id: export_chart
    type: io.kestra.plugin.kestra.dashboards.Export
    kestraUrl: http://localhost:8080
    auth:
      username: admin@kestra.io # pass your Kestra username as secret or KV pair
      password: "{{ secret('KESTRA_PASSWORD') }}" # pass your Kestra password as secret or KV pair
    dashboardId: compliance_overview
    chartId: executions_by_namespace
    format: CSV

  - id: send_email
    type: io.kestra.plugin.email.MailSend
    from: hello@kestra.io
    to: compliance@kestra.io
    username: "{{ secret('EMAIL_USERNAME') }}"
    password: "{{ secret('EMAIL_PASSWORD') }}"
    host: mail.privateemail.com
    port: 465 # or 587
    subject: "Weekly Compliance Report"
    htmlTextContent: "Please find attached the weekly compliance report."
    attachments:
      - name: executions_by_namespace.csv
        uri: "{{ outputs.export_chart.files['executions_by_namespace'] }}"
        contentType: text/csv

triggers:
  - id: schedule
    type: io.kestra.plugin.core.trigger.Schedule
    cron: 0 8 * * 1
Properties

Select API authentication

Use either an API token or HTTP Basic (username/password); do not provide both.

Definitions
apiTokenstring

API token for bearer auth

autobooleanstring
Defaulttrue

Automatically retrieve credentials from Kestra's configuration if available

The default configuration can be configured globally inside the Kestra configuration file:

  • Set kestra.tasks.sdk.authentication.api-token to use an API token
  • Set kestra.tasks.sdk.authentication.username and kestra.tasks.sdk.authentication.password for HTTP basic authentication
  • Set kestra.tasks.sdk.authentication.url to also default the Kestra API endpoint (see kestraUrl above) The Enterprise edition also provides setting a default configuration at the Namespace or Tenant level by an administrator. Set to false to also opt out of the default URL.
passwordstring

Password for HTTP Basic auth

usernamestring

Username for HTTP Basic auth

Chart id

Identifier of the chart to export. When omitted, every non-Markdown chart of the dashboard is exported.

Dashboard id

Identifier of the dashboard to export from. Defaults to the current tenant's default dashboard.

End date

Overrides the dashboard's default time window end.

DefaultCSV
Possible Values
CSVION

Export format

Supported values: CSV, ION. Defaults to CSV.

Override Kestra API endpoint

URL used for calls to the Kestra API. When null, falls back to the url configured alongside the default SDK authentication (Namespace or Tenant level, Enterprise edition), then renders {{ kestra.url }} from configuration; if still empty, defaults to http://localhost: 8080. Trailing slashes are stripped before use.

Reference (ref) of the pluginDefaults to apply to this task.

Start date

Overrides the dashboard's default time window start.

Override target tenant

Tenant identifier applied to API calls; defaults to the current execution tenant.

SubTypestring

Exported chart files

Map of chart id to the URI of its exported file in internal storage.