Number of accounts on server via API

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
As part of a billing script we use there is a simple function that contacts the cpanel server and pulls out via the API the number of hosting accounts on the server.

One of our servers is reporting via the API that it only has 172 accounts when it actually holds 249.

If I view the accounts using WHM I see the correct number.

So, can anyone tell me where this account tally is stored for use by the API so I can fix it?

many thanks.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I am not familiar with an API call in the XML API that specifically returns the number of accounts on a server. Can you perhaps provide the API call you are using for this?
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
Thanks David, I'll ask the developer how the script pulls that info across.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
939
22
168
I've found the problem, it was a configuration issue.

The server's whm address was configured in the script incorrectly so it couldnt connect - but - instead of reporting an error that it couldnt connect, the script just displayed the details from the last time it successfully connected.

Apologies for taking up your time with this.
 
Last edited: