listaccts API not returning full list of accounts after transfer to new server, but accounts exist

swbrains

Well-Known Member
Sep 13, 2006
306
45
178
After using the Transfer Tool to port sites to a new server, the listaccts API is not working as expected. I have 700+ accounts on the new server, but the listaccts API returns an array with 511 accounts. In error_log, I did find this entry that may be related:

[2023-01-04 09:06:26 -0600] warn [whostmgr10] Failed to fetch cPStore products list: Cpanel::Exception::Market::Disabled/(XID gg32a9) cPanel Store indicated that the Market has been disabled by the license holder...

At the end of that error message (which is quite long) is:
whostmgr::bin::xml_api::script(CODE(0x34510e8), "-json", "./listaccts") called at whostmgr/bin/xml-api.pl line 5072

So I'm led to believe that error is related to the call to listaccts by my application.

I found an article here with cPanel store/market message that said to go to WHM>>>Market>>Market Provider Manager. When I go there, I get a popup error:
API failure: (XID 9bjcd6) 1 error occurred: Error #1: “cPanel Store” indicated that the Market has been disabled by the license holder. (BTW, this message also appears on this page of the old server's WHM.)

I don't know if that's all related to the listaccts call, but I figured I'd mention it since the error_log referenced listaccts in the error message.

BTW, the JSON returned from the listaccts call shows a status of 1 and statusmsg = "Ok". The list is just incomplete.
 
Last edited:

swbrains

Well-Known Member
Sep 13, 2006
306
45
178
I have discovered that, for some reason, the transfer process did not put all transferred accounts under my reseller account, which is the one calling the listaccts API. About 200 of 700 accounts were configured as root ownership, yet all were transferred in the same transfer process. I used the WHM function to change all the "root" owned accounts to be owned my reseller account and now the listaccts function returns the full list of accounts. :)

By the way, the WHM feature to change ownership of multiple accounts could use "select all" and "deselect all" buttons. Checking 200+ boxes by hand was tedious!