Testing

Browser-Based Testing

You can test the BMC Atrium Discovery Export APIs using a browser. Enter the following URL in a browser, replacing appliance with the resolvable hostname or IP address, using the required CsvApi or XmlApi label, and using the appropriate user name and password for the appliance that you are connecting to. For example using the CSV API:

http://appliance/ui/api/
   CsvApi?query=SEARCH%20Host&username=system&password=system

A dialog is displayed. Click the Open button to view that data in the application registered for CSV files. Click the Save button to save the data. The default file name is CsvApi.
For example using the XML API:

http://appliance/ui/api/
   XmlApi?query=SEARCH%20Host&username=system&password=system

The results are displayed in the browser. Use the File > Save menus to save the output as an XML file.

Command Line Testing

You can also test the BMC Atrium Discovery Export APIs from a UNIX command line using the command wget.
In this section the examples are for the CSV and XML APIs. The queries in all of the examples are appended to the following command line with no intervening spaces. For the CSV API:

$ wget http://appliance/ui/api/CsvApi?

For the XML API:

$ wget http://appliance/ui/api/XmlApi?

An example query to be appended to the command lines is shown as:

query=SEARCH%20Host\&username=system\&password=system

The wget command returns the HTTP status code, for a successful query this is 200 OK. The data returned by the query above is written to a file in the current working directory which for the CSV API is called:

CsvApi?query=SEARCH%20Host\&username=system\&password=system

For the XML API, the file is called

XmlApi?query=SEARCH%20Host\&username=system\&password=system
Was this page helpful? Yes No Submitting... Thank you

Comments