In order to make it possible to deploy a single dashboard in multiple WSO2 product instances (e.g., multiple SP instances, other SP-based Analytics profiles such as EI Analytics, etc.), WSO2 SP allows dashboards to be imported and exported.
Exporting dashboards is carried out via a REST API that can be invoked via the following curl command. This generates a JSON file that can be imported to another SP-based WSO2 product.
e.g., the following curl exports a dashboard named
This export generates the following JSON file.
The fields included in the dashboard structure in this generated file are as follows:
|This field contains the definition of the dashboard, including the dashboard metadata such as the dashboard name, URL and page structures including widgets.|
|This field contains the definitions of widgets generated via the Widget generation wizard.|
|This contains the list of the names of the custom widgets contained in the dashboard.|
Once a dashboard is exported from one SP-based WSO2 product as explained in Exporting Dashboards, it can be exported into the Dashboard portal of any other SP-based WSO2 product instance. This is done by copying the generated JSON file and placing it in the
<SP_HOME>/wso2/dashboard/resources/dashboards directory of the required SP-based WSO2 product pack.
e.g., If the
ei-analytics.json generated in the above example is imported to another WSO2 SP instance, its path in the SP pack is
When the SP server is started, it picks the JSON files located in the
<SP_HOME>/wso2/dashboard/resources/dashboards directory and copies those dashboards and widgets into the relevant tables in the underlying
DASHBOARD_DB database. Once the dashboard is successfully imported, the following messages are logged in a file named carbon.log in the
When a dashboard is successfully imported, the
.imported suffix is added to the name of the JSON file (e.g.,
ei-analytics.json.imported). This prevents the same dashboard from being imported more than once (because importing more than once can result in overwriting any custom changes you may have made via the Dashboard Designer).