Import Dashboard

put

/serviceapi/dashboards.service/import

Imports 1 or more dashboards through a file.

Request

Supported Media Types
Path Parameters
  • Check and print a brief summary about what will be imported. Import will NOT be executed.
  • A path parameter that when enabled, will override existing dashboards instead of creating new ones.

    Default: false.

  • 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.

Body ()
The file to be used when importing dashboards. To obtain the import file, first use the Export API.
Root Schema : ImportJSON
Type: object
The file to be used when importing dashboards. To obtain the import file, first use the Export API.
Example:
["demoDashboard01", "demoDashboard02"]
Back to Top

Response

Supported Media Types

200 Response

Successful operation - Import result will be stored in
Back to Top

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
Back to Top