1.0.1

vCenter Chargeback API Programming Guide
12 VMware, Inc.
Toaccomplishtheobjectivestatedearlier,thevCenterChargebackAdministratorneedstodothefollowing
tasks.ThesectionsthatfollowthisdiagramexplainhowtoperformthesetasksusingthevCenterChargeback
APIs.
Figure 2-2. Task Flow
Login to vCenter Chargeback Server
UsetheLoginAPItologintovCenterChargebackserver.
ThesyntaxforthisAPIis<HTTP_request_method> <Base_URL>/login.Forexample,youcandefinea
callasfollows:
POST https://123.123.123.123/vCenter-CB/api/login.
UsetheURLparameterversiontospecifytheAPIversiontobecalled.
ThisAPItakesarequestXMLinwhichyoucanspecifythefollowinglogindetails:
LDAPserverID
Usertype
Username
Password
ThefollowingisasamplerequestXMLfile:
<?xml version="1.0" encoding="UTF-8"?>
<Request xmlns="http://www.vmware.com/vcenter/chargeback/1.0.1">
<Users>
<User>
<!-- <LdapServerId>1</LdapServerId> -->
<Type>local</Type>
<Name>TestUser</Name>
<Password>SomePassword</Password>
</User>
</Users>
</Request>
Login
Generate Report
Add vCenter Server Information
Create Hierarchy
Add Fixed Cost