2.0
Table Of Contents
- API Programming Guide
- Contents
- About This Book
- vCenter Chargeback Manager APIs
- Understanding the Workflow
- Using vCenter Chargeback Manager with a Billing System
- Index
VMware, Inc. 23
Chapter 2 Understanding the Workflow
} finally {
if (put != null) {
put.releaseConnection();
}
}
}
Generate a Report
UsetheGenerateReportAPItosendarequesttocreateareport.
To generate a report
1 CalltheAPIbyusingthefollowingsyntax.
<HTTP_request_method> <Base_URL>/report
Forexample,youcandefineacalllikethis:
POST https://123.123.123.123/vCenter-CB/api/report
2IntherequestXML,specifythefollowingdetailsaboutthehierarchy,entity,resourcecounters,andthe
costmodel.
Nameofthereport.
Descriptionofthereport.
Typeofthereportthatyouwanttogenerate.Youcangenerateacostreport,costcomparisonreport,
orausagereport.
Startandendtimesoftheperiodforwhichthereportistobegenerated.
IDsofthehierarchy,entity,costmodel,andcomputingresourceforwhichyouwanttogeneratethe
report.
ThefollowingisanexamplerequestXML.
<?xml version="1.0" encoding="UTF-8"?>
<Request>
<Reports>
<Report>
<MetaData>
<Name>SampleReport</Name>
<Description></Description>
<ReportType>COST_REPORT</ReportType>
<OwnedByName></OwnedByName>
<ReportPeriod>
<From>1320085800000</From>
<To>1322418599999</To>
</ReportPeriod>
<Hierarchies>
<Hierarchy id="1023">
<Entities>
<Entity id="1024" costModelId="30" />
</Entities>
</Hierarchy>
</Hierarchies>
<ComputingResources>
<ComputingResource id="1" />
<ComputingResource id="2" />
<ComputingResource id="5" />
<ComputingResource id="6" />
<ComputingResource id="9" />
<ComputingResource id="10" />
</ComputingResources>
</MetaData>
<Configuration>
<Computation>
<Settings type="costVariance">