Import Dashboard
/serviceapi/dashboards.service/import
Imports 1 or more dashboards through a file.
Request
- application/json
-
checkOnly: boolean
Check and print a brief summary about what will be imported. Import will NOT be executed.
-
override: boolean
A path parameter that when enabled, will override existing dashboards instead of creating new ones.
Default: false.
-
reuseExisting: boolean
Reuse existing widget or dashboard if destionation site has an existing one. This parameter won't work with override=true or Oracle created widgets or dashboards.
Default: false.
object
["demoDashboard01", "demoDashboard02"]
Response
- application/json
200 Response
Examples
Example 1
The file export_output contains the selected dashboard's information obtained from the export endpoint. This cURL call will import the selected dashboards from the export endpoint example:
curl -u ${OMC_USERNAME}:${PASSWORD} -X PUT "https://{OMC_URL}/serviceapi/dashboardModel/import" --data @/<yourpath>/export_output -o /<yourpath>/json_result
Response
The following shows an example of the response body and the import result will be stored into 'json_result' file.
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 306k 0 13483 100 293k 797 17795 0:00:16 0:00:16 --:--:-- 0
Example 2: Override Dashboard
Use the path parameter override=true and overwrite a dashboard instead of creating a new one. This cURL call will import (and overwrite if it exists) the selected dashboards from the export endpoint example:
curl -u ${OMC_USERNAME}:${PASSWORD} -X PUT "https://{OMC_URL}/serviceapi/dashboardModel/import?override=true" --data @/<yourpath>/export_output -o /<yourpath>/json_result
The following shows an example of the response body and the import result will be stored into 'json_result' file.
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 414k 0 14383 100 353k 797 17795 0:00:18 0:00:18 --:--:-- 0