.pdf)
WHM Plugins
showbw function from within your custom script:
/xml-api/showbw function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/showbw
showbw function from within your custom script:
/json-api/showbw function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/showbw
showbw function takes the following optional variables as input: 2 would request bandwidth information for the month of February.
1 through 12
2008 would request bandwidth information from the year 2008.
domain, user, owner, package
showbw function. 1 — The account has been deleted.
0 — The account remains on the server.
1 — Account is a reseller account.
0 — Account is not a reseller account.
2 would indicate bandwidth information for the month of February.
https://example.com:2087/xml-api/showbw?reseller=example in WebHost Manager will produce output similar to:
<showbw>
<bandwidth>
<acct>
<deleted>0</deleted>
<limit>0</limit>
<maindomain>example.com</maindomain>
<owner>root</owner>
<reseller>0</reseller>
<totalbytes>0</totalbytes>
<user>example</user>
</acct>
<acct>
<deleted>0</deleted>
<limit>0</limit>
<maindomain>domain.com</maindomain>
<owner>dominic</owner>
<reseller>1</reseller>
<totalbytes>0</totalbytes>
<user>dominic</user>
</acct>
<acct>
<deleted>0</deleted>
<limit>5242880</limit>
<maindomain>example2.com</maindomain>
<owner>root</owner>
<reseller>1</reseller>
<totalbytes>0</totalbytes>
<user>mary</user>
</acct>
<month>6</month>
<reseller>root</reseller>
<totalused>0</totalused>
<year>2009</year>
</bandwidth>
</showbw>
https://example.com:2087/json-api/showbw?reseller=example in WebHost Manager will produce something similar to:
{
"bandwidth":[
{
"reseller":"root",
"month":6,
"acct":[
{
"reseller":0,
"bwusage":[
],
"deleted":0,
"limit":"0",
"owner":"root",
"user":"example",
"maindomain":"example.com",
"totalbytes":0
},
{
"reseller":"1",
"bwusage":[
],
"deleted":0,
"limit":"0",
"owner":"dominic",
"user":"dominic",
"maindomain":"domain.com",
"totalbytes":0
},
{
"reseller":"1",
"bwusage":[
],
"deleted":0,
"limit":"5242880",
"owner":"root",
"user":"mary",
"maindomain":"example2.com",
"totalbytes":0
}
],
"totalused":"0",
"year":2009
}
]
}