Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dashboard] Export dashboard as a ZIP #1078

Open
lasanthaS opened this issue Sep 18, 2018 · 1 comment
Open

[Dashboard] Export dashboard as a ZIP #1078

lasanthaS opened this issue Sep 18, 2018 · 1 comment

Comments

@lasanthaS
Copy link
Contributor

Description:
In the current implementation, the dashboard can be exported via the following cURL command.

curl 
    -u <USERNAME>:<PASSWORD> 
    -o '<DASHBOARD_ID>.json' 
    -k 
    'https://localhost:9643/portal/apis/dashboards/<DASHBOARD_ID>/export'

This dumps the dashboard as a JSON file which contains,

  • Dashboard definition
  • Generated widget definitions
  • Custom widget names

This needs to be improved in order to download the dashboard as a ZIP file which contains,

  • Above dashboard JSON file
  • All the custom widgets

Affected Product Version:
WSO2SP 4.3.0

@lasanthaS
Copy link
Contributor Author

Since this feature needs to support both the scenario, i.e. download as a JSON and download as a ZIP file, Accept HTTP header can be used to distinguish the type.

Download as JSON (default for backward compatibility)

curl 
    -u <USERNAME>:<PASSWORD> 
    -o '<DASHBOARD_ID>.json' 
    -H 'Accept: application/json'
    -k 
    'https://localhost:9643/portal/apis/dashboards/<DASHBOARD_ID>/export'

Download as ZIP

curl 
    -u <USERNAME>:<PASSWORD> 
    -o '<DASHBOARD_ID>.json' 
    -H 'Accept: application/zip'
    -k 
    'https://localhost:9643/portal/apis/dashboards/<DASHBOARD_ID>/export'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant