Bandwidth / Disk Usage API

I’ll ask this again in case it was forgotten… When are we going to see API calls for billing systems to be able to query the bandwidth/disk limits and usage? I last asked about this before the move to 4.x and was told it was “coming.” That was a handful of months ago.


listAvailableDiskSpace would that be the one to get the Diskspace? If you want used diskspace, grab the settings of the accounts’ quota and subtract free diskspace and then you’ve got usage?

EverythingWeb, thanks for that information. Basically I am waiting for API calls that would allow a billing system to properly perform disk & bandwidth overage billing (if so selected in the billing system). To some extent I understand that to do disk overage billing properly may require more work on the interworx internals than just an API call.

If there are methods of doing this for both disk and bandwidth with some additional work besides a straight forward API call could the more interworx API experienced please enlighten me.

Again, thanks for the information on the disk space. I’ll do some playing and see if the results are what one would expect.

What metric will you be using to bill for disk overage? Will you bill based on the diskspaxe in use at the end of the billing cycle, a flat fee as a penalty sharge for going over, aggregate total of amount of diskspace used over quota checked every 24hours or so?

I suppose the answer to this helps define how you can achieve.

FAO Iworx; can this thread be split into the api section? [EDIT: Done]

For the bandwidth and disk limits look for

API Controller : /nodeworx/siteworx
Action: querySiteworxAccountDetails

Domain :
account_data : opt_storage, opt_bandwidth

For the bandwidht and disk usage look for

API Controller : /nodeworx/siteworx
Action: querySiteworxAccountDetails

Domain :
account_data : storage_used, bandwidth_used

More info here :

In the next build, there will be an easier function to do this - /nodeworx/siteworx -> listBandwidthAndStorage

Hey guys.

Sorry to revive an old thread, but I’m after the same data myself.

I think this function is precisely what I’m looking for. I’m attempting the listBandwidthAndStorage command, however, and it reports:

There was a problem validating the form. Please see details below.
domain: This input is required
account_data id|status|billingday|external_id|unixuser|date_created|nickname|email|language|theme|domain|ip|package_name|storage_used|bandwidth_used|uid|gid|reseller_id|opt_storage|opt_bandwidth|opt_email_aliases|opt_email_autoresponders|opt_email_boxes|opt_email_groups|opt_ftp_accounts|opt_mysql_dbs|opt_mysql_db_users|opt_pointer_domains|opt_slave_domains|opt_subdomains|opt_backup|opt_cgi_access|opt_crontab|opt_dns_records|opt_resolve_xferlog_dns|opt_ssl|opt_burstable|opt_save_xfer_logs|all_package_options

The API at lists no domain input; but I imagine this could be a semantic issue since there are no Siteworx accounts associated to this Nodeworx account.

I’m after the raw data that’s used to populate the left hand side when you log into Nodeworx. Is there any way to get to this via API?

If anyone’s figured this out, without the context of a specific Siteworx domain, that’d be great.

Thank you!!

Hi Alex

I believe your thought is correct, ie no siteworx account exist in your account

That said though, if you look at your reseller account, it shows as unlimited, so the screen your looking at displays Infiniti or 0 used

If we has limited your reseller account, you would see limit values shown, which would be 0 unless some had been used.

You can reset your own values using the credentials I emailed, and see what I mean, and create a siteworx account, populate it with some data (prefer 1gb of data) and it may make more sense I think.

If you want me to populate, please let me know

Many thanks


Hey John!

Sorry to respond so late, I was lucky to have Nathan from Interworx work through the requirements with me, and unfortunately there is no Interworx API call to report working-user limits. By working user, I mean the user that’s operating the API (even if it is the master key).

A key can always report its child account usage, but, not its own. It’s a funny pattern in a way, because the parent has access to the data you need (except of course for the parent account on the box). In short, without a means to establish an account’s total resources pool (bandwidth, space, etc.) there’s no means to report resource usage rates (short of filling out forms, but that’s an evil that could cause sync problems). Interworx noted they’ll take this feature request it to a dev feature request meeting later in the month.

The current API is only good if you’re using your API key to decipher limits for your own clients (e.g., you were building a customer portal). It’ll still serve in this respect for me; but no fancy graphs for bandwidth or space growths for now. I’ll put a coming-soon graph up in the dashboard :wink: