resellerstats function from within your custom script:
/xml-api/resellerstats 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/resellerstats
resellerstats function from within your custom script:
/json-api/resellerstats 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/resellerstats
resellerstats function takes the following required variable as input: resellerstats function. 1 — yes.
0 — no.
1 — yes.
0 — no.
resellerstats operation.
https://example.com:2087/xml-api/resellerstats?reseller=bob in WebHost Manager will produce output similar to:
<resellerstats>
<result>
<accts>
<bandwidthlimit>0.00</bandwidthlimit>
<bandwidthused>0.00</bandwidthused>
<deleted>1</deleted>
<diskquota>0.00</diskquota>
<diskused>0.00</diskused>
<domain>somedomain.tld</domain>
<package>deleted account</package>
<suspended>1</suspended>
<user>user</user>
</accts>
<accts>
<bandwidthlimit>1000.00</bandwidthlimit>
<bandwidthused>256.31</bandwidthused>
<deleted>0</deleted>
<diskquota>1000.00</diskquota>
<diskused>500.21</diskused>
<domain>otherdomain.tld</domain>
<package>gold</package>
<suspended>0</suspended>
<user>somed</user>
</accts>
<diskused>516.6</diskused>
<reseller>bob</reseller>
<status>1</status>
<statusmsg>Fetched Reseller Data OK</statusmsg>
<totalbwalloc>3200</totalbwalloc>
<totalbwused>1007.07</totalbwused>
<totaldiskalloc>1800</totaldiskalloc>
</result>
</resellerstats>
https://example.com:2087/json-api/resellerstats?reseller=bob in WebHost Manager will produce output similar to:
{
"result":{
"reseller":"john",
"totalbwalloc":0,
"status":1,
"totaldiskalloc":0,
"totalbwused":0,
"statusmsg":"Fetched Reseller Data OK",
"accts":[
{
"diskquota":0,
"bandwidthused":0,
"suspended":0,
"user":"cpanel1",
"deleted":0,
"bandwidthlimit":0,
"domain":"cpanelrocks.net",
"package":"Limit One",
"diskused":19.33
}
],
"diskused":19.33
}
}
Copyright © cPanel 2000-2009.