Dashboards Web Service

Local admin users can perform dashboard management tasks using the PC RESTful web services.
Local admin users can perform dashboard and on-demand report template management tasks using the
NetOps Portal
RESTful web services.
You can do the following using the
dashboards
NetOps Portal
web service:
  • Manage (create and update) dashboards or on-demand report templates.
  • Import and export dashboards.
  • Import and export on-demand report templates.
  • Display data views.
  • Build the dashboards once and deploy them in an additional tenant. During the import process, you can choose to deploy extra dashboards without manually recreating them.
In this article:
Verify the Prerequisites
  • You have connected the REST client that you will use to invoke the
    NetOps Portal
    web services to the
    NetOps Portal
    RESTful web services.
  • You are a local admin user.
Access the dashboards Web Service Documentation
Issue the following call to see the parameters for the
dashboards
web service:
http://
PC_host
:8181/pc/center/rest/dashboards/documentation
Export a Dashboard or On-Demand Report Template
Export a dashboard or on-demand report template to an XML file that you will use to import into another instance of
NetOps Portal
. This process requires the internally-assigned page ID is required. Use
NetOps Portal
to find the ID.
Exporting a dashboard or on-demand report templatein XML format using the
dashboards
web service, and then importing the it from the XML file can result in a broken dashboard or on-demand report template.
Best Practice:
Create a dashboard or on-demand report template by copying an existing one using
NetOps Portal
.
For more information, see Manage Dashboards.
Follow these steps:
  1. As a local admin user, navigate to the dashboard or on-demand report template to export.
  2. In the browser window, find the page ID in the URL.
    Example:
    http://
    <PC_host>
    :8181/pc/desktop/page?pg=
    2000040
    The page ID is 2000040.
  3. In the REST client, set the URL to the following:
    http://
    <PC_host>
    :8181/pc/center/webservice/dashboards/pageId
  4. Select
    GET
    for
    HTTP Method
    .
    An error or success message appears in the response.
An XML file is created that represents the exported dashboardor on-demand report template.
Import a Dashboard or On-Demand Report Template
Import a dashboard or on-demand report template from an XML file. To import a dashboard or on-demand report template for a specific tenant, log in as the administrator for that tenant.
Follow these steps:
  1. As a local admin user, browse to the XML file that represents a dashboard or on-demand report template that you have exported, or paste the exported text of the XML file into the
    Body
    text field.
  2. Update the
    dashboardMenu
    ,
    menuItem
    , and
    dashboardTitle
    attributes in the XML body for the dashboard that you want to import:
    <dashboardMenu>MyCustomDashboard_DashboardMenuName</dashboardMenu> <menuItem>MyCustomDashboard_MenuItemName</menuItem> <dashboardTitle>MyCustomDashboard_DashboardTitleName</dashboardTitle>
    • <dashboardMenu>
      The title that appears at the top of the dashboard menu. Specify an existing top-level dashboard menu title for this attribute.
      Examples:
      Infrastructure Health, Capacity Planning
    • <menuItem>
      The title of the dashboard that appears in the dashboards menu. This property is unique to each tenant.
    • <dashboardTitle>
      The title of the dashboard that appears at the top of the dashboard page. This property is unique to each tenant.
  3. (Optional) Test the import of the dashboard or on-demand report template that you want to import before you import it. Perform the following
    POST
    operation:
    http://
    <PC_host>
    :8181/pc/center/webservice/dashboards/test/
    The following message appears to indicate that the test was successful:
    <?xml version="1.0" encoding="UTF-8"?>
    <msg>Validation successful.</msg>
    Checking is performed for the unique
    menuItem
    and
    dashboardTitle
    attributes.
  4. Set the URL to the following:
    http://
    PC_host
    :8181/pc/center/webservice/dashboards/import
  5. Perform a
    POST
    operation.
    An error or success message appears in the response.
    The
    dashboards
    web service assigns a page ID to the imported dashboard or on-demand report template.
Update a Dashboard or On-Demand Report Template
You can update a dashboard or on-demand report template based on a page ID. Edit the XML to modify the dashboard or on-demand report template.
Follow these steps:
  1. As a local admin user, set the URL to the following:
    http://
    <PC_host>
    :8181/pc/center/webservice/dashboards/pageId
  2. Paste the XML file that represents the dashboard or on-demand report template into the
    Body
    text field, and then edit the XML as needed. 
  3. Perform a
    PUT
    operation.
    An error or success message appears in the response.