Problem with CMD_API_SHOW_ALL_USERS empty array

birchoff

New member
Joined
Aug 22, 2017
Messages
3
Hi,
I'm learning DA API's for my project and i'm testing the simplies way to connect with my DA account (admin of course) for now.
CMD_API_SHOW_USER_USAGE?user=user_name work fine, I can see nice array as a result.

But second day i'm fighting with the CMD_API_SHOW_ALL_USERS command or CMD_API_SHOW_USERS or CMD_API_SHOW_USERS=?reseller=reseller_name
I always get empty array as result: Array ( )
I tried to connect with and without SSL, always same result empty array.

I use simpliest code:
PHP:
$x = file_get_contents('https://admin:[email protected]_adress.com:2223/CMD_API_SHOW_ALL_USERS'); 
$y = urldecode($x); 

parse_str($y, $output); 

print "<pre>";
print_r($output);
print "</pre>";

I tried connecting with httpsocket.php and connection was ok, but still same empty array.
Of course on the server there are ~300 hosting accounts. Hosting providers tells me that tehy dont block any of apis commands and my account have all rights to api.
I tried to print_r result before decoding and it was empty too for this commands. For command CMD_API_SHOW_USER_USAGE?user=user_name it was ok.

Very strange thing, could some one can help me?
 
Hi,
page don't work:
ERR_INVALID_HTTP_RESPONSE

the command /CMD_API_SHOW_USER_USAGE?user=user_name i that method you said work fine for me, I get the response.
 
You need to check directadmin logs then, probably they can give more information on the matter.
 
It turned out that my hosting provider blocks some API commands... Is it normal? I'm paying for VPS managed with DA licence... They explain them selves that the service is shared, and with this command I could get info about other users. And they don't want to delete this blockade.
Is there some another command with i can get info about my users? I tried CMD_API_SHOW_USERS with reseler parameter, but I get that same: blank array.
Of course my account is admin account so I don't understand this situation.
 
It turned out that my hosting provider blocks some API commands... Is it normal? I'm paying for VPS managed with DA licence... They explain them selves that the service is shared, and with this command I could get info about other users. And they don't want to delete this blockade.
Is there some another command with i can get info about my users? I tried CMD_API_SHOW_USERS with reseler parameter, but I get that same: blank array.
Of course my account is admin account so I don't understand this situation.

If you are having a vps with your own Directadmin license it is not possible for you to see data from other vps owners on the server. So I don't know what your hosting provider is talking about, but it should be safe to have access to the full API.

Best suggestion I could give us talk this over with your hosting company to find a solution.

Regards,
Niels
 
Back
Top