Home  Solutions and Integrations > Solutions and Integrations > Business Availability Center APIs > Working with the Dashboard API > Building Queries



Building Queries

You use the Dashboard API to query the database and return a list of views in XML format.

Tip: You can use XSLT to convert the XML output into any other format (commonly text or HTML). For example, using basic XSLT transformations, you can produce HTML reports that are formatted to fit on mobile devices. These reports can be served via a mobile portal to display critical Business Availability Center views on users' mobile phones.

Query Syntax

The basic syntax of the query is as follows:

http://<Gateway Server>/topaz/bam/BAMOpenApi?customerId=<customer ID>&userName=<user name>&password=<password>&command=<command parameter>

Depending on the command parameter defined, additional parameters may also be included.

Main Parameters Used in the Query

The table below lists the parameters that must be defined in the query.

Parameter
Description
customerID
HP Business Availability Center customers should specify 1. HP Managed Software Solutions customers should specify their unique customer ID.
userName
Specify a user name defined in HP Business Availability Center. Note that the query does not encrypt the login credentials.
password
Specify the password for the user name provided. Note that the query does not encrypt the login credentials.
command
Specify one of the following values:
getViews – Specify to retrieve all views from the CMDB. No other parameters are required.
getNodes – Specify to retrieve all child nodes of a specified view (you must also specify the view for which to retrieve child nodes in the viewName parameter); if using this command parameter you can also set the following parameters: showTooltip, depth, layout
viewName
If the getNodes command parameter is defined, include this parameter in the query and specify the view to retrieve. You can set the value to ticker_all_views to retrieve all views and their nodes.
showTooltip
If the getNodes command parameter is defined, you can include this parameter in the query to specify whether to display Dashboard's KPI tooltip data, either true to display data or false to not. The default value is false.
depth
If the getNodes command parameter is defined, you can include this parameter in the query to specify the number of levels in the view to display. The default value is 1.
layout
If the getNodes command parameter is defined, you can include this parameter in the query to specify the layout for the query results, either hierarchical or flat. In flat mode all nodes are retrieved in a flat list, and in hierarchical mode nodes are retrieved in the same hierarchy as in the view. The default value is flat.




© Copyright 2007 Hewlett-Packard Development Company, L.P.