Get List Of Archived Reports For A Hierarchy - VMware VCENTER CHARGEBACK 1.5 - API Manual

Vcenter chargeback api programming guide
Hide thumbs Also See for VCENTER CHARGEBACK 1.5 - API:
Table of Contents

Advertisement

public static void sampleDeleteReportSchedule(String baseURL, int scheduleId) throws
DeleteMethod delete = null;
HttpClient client = new HttpClient();
Protocol.registerProtocol("https", new Protocol("https", (ProtocolSocketFactory) new
String uri = "https://" + baseURL + "/vCenter-CB/api/reportSchedule/" + scheduleId;
try {
} finally {
}
}

Get List of Archived Reports for a Hierarchy

For a specific hierarchy, you can get a list of archived reports that were generated after a specific time. To do 
this, you can use the Search API.
To get list of archived reports for a hierarchy
1
Call the Search API by using the following URL in your program.
POST <API base URL>/search
2
In the request XML, use the following section to search for reports with the specific hierarchy name and 
created after or equal to a time passed in milliseconds since January 1, 1970.
<Criteria type="AND">
<Filter name="hierarchyName" type="EQUAL" value="TestHierarchy" />
<Filter name="createdOn" type="GT_EQUAL" value="1272639780140" />
</Criteria>
The following is an example request XML.
<?xml version="1.0" encoding="UTF-8"?>
<Request>
<SearchQueries>
<SearchQuery id="report">
</SearchQuery>
</SearchQueries>
</Request>
The response XML contains a list of reports that match the search criteria.
VMware, Inc.
HttpException, IOException, KeyManagementException,
NoSuchAlgorithmException, JDOMException {
FakeSSLCertificateSocketFactory(), 443));
delete = new DeleteMethod(uri);
client.executeMethod(delete);
System.out.println(delete.getResponseBodyAsString());
if (delete != null) {
delete.releaseConnection();
}
<Criteria type="AND">
<Filter name="name" type="LIKE" value="%report1%" />
<Filter name="desc" type="LIKE" value="%reportDesc1%" />
<Filter name="costModelName" type="EQUAL" value="costModel1"/>
</Criteria>
<SortBy>
<Params>
<Param index="1" order="DESC">totalCost</Param>
</Params>
</SortBy>
<Pagination>
<FirstResultCount>0</FirstResultCount>
<MaxResultCount>100</MaxResultCount>
</Pagination>
Chapter 3 Using vCenter Chargeback with a Billing System
37

Advertisement

Table of Contents
loading

Table of Contents