getting bandwith of whole Reseller account

martijnS

Verified User
Joined
Jun 21, 2007
Messages
16
Location
Holland
Hi,

I have somewhat of a problem/feature request

I want too use the api too get the bandwidth (and possible disk space) so we can keep an eye on our users, we like the API in this case so we can update it regularly.

The point is the following API command CMD_USER_USAGE which gives you what is promises the reseller on user level. What i want is a CMD_RESELLER_USAGE function. I mean i assume 9/10 users of DA sell Reseller accounts. An easy way too get this would be great.

If someone has a way too do this and wants too share i and i reckon many more would be very thankfull!
 
Hi,

I have somewhat of a problem/feature request

I want too use the api too get the bandwidth (and possible disk space) so we can keep an eye on our users, we like the API in this case so we can update it regularly.

The point is the following API command CMD_USER_USAGE which gives you what is promises the reseller on user level. What i want is a CMD_RESELLER_USAGE function. I mean i assume 9/10 users of DA sell Reseller accounts. An easy way too get this would be great.

If someone has a way too do this and wants too share i and i reckon many more would be very thankfull!
There are other possible ways to do this, but I think DA implimenting it into the API would be the best solution. Any other way would require getting a list of users, checking their usage, adding it all together, and everything else. Doing it for multiple resellers would hit the server rather harshly.
 
That's kind of the point, it is a rather how will i say it... Well it's more of a 5 mile course for something relatively simple in my eyes.

I mean there must be some kind of method for it that DA already uses, looking at thing that when u "logon as reseller". I have the idea it does the same already (when the bandwidth and disk space bar seem too fill up).

And like i said before i assume that say 80% of the DA user sell Reseller Level account. For a few server this a manageable but when u got something like 25 servers you have better things to do.
 
Last edited:
I believe this may be what you're looking for:
http://www.directadmin.com/features.php?id=368
CMD_API_RESELLER_STATS?type=usage

In general to find any API, go to www.directadmin.com/versions.php
Search for:

CMD_API

plus a few keywords.. in this case:

CMD_API reseller bandwidth

Also, if you know where you can get what you want in DA with your browser, eg: CMD_RESELLER_STATS
just try throwing an _API_ right after the CMD_ to see if we've create an API for exactly that page.

Note that pretty much every CMD_API is simply a duplicate of the web browser version... except the output is parseable. We don't dulicate the code in DA to handle the calls (CMD_ and CMD_API use the same DA code) the only difference is a api=1 flag set internally and the output changes to be script parseable. So you don't actually 100% require a CMD_API call should any not exist.. you can always call the same browser version for things where you post info. Of course it wouldn't work in this case since you need the parseable data ;) But we've covered pretty much all aspects of DA now, so you should be able to do pretty much anything via API that you can with a browser.

John
 
is there no one with this issue?
This should be a rather easy fix. Hopefully John will see this thread and either correct us or add the fix to the next version. You shouldn't have to log in as each reseller to view their stats.
 
Hello,

Looking over the code, it is just for the currently logged in Reseller. (CMD_API_RESELLER_STATS)

Note, that logging in as the Reseller is not difficult, you just use the login name of:

admin|reseller

with the admin pass, and you're logged in as the reseller.

If you guys still need, I can add CMD_API_SHOW_RESELLER?user=reseller for the next release. FYI, send us an email if you need us to see a thread as we dont scour the forums regularly.

John
 
For everyone information, i have asked John too add the feature in the next DA release.

I haven't received an answer jet but i think/assume i will be added in the next release.
 
Back
Top