#1 (permalink)  
Old 03-06-2009, 10:25 AM
Registered User
 
Join Date: Mar 2009
Posts: 4
Andrewcp is on a distinguished road
Bandwidth in XML API

Hi there

What .xml file is the bandwidth displayed on using the XML API? It is not displayed in accountsummary xml file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-06-2009, 10:35 AM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by Andrewcp View Post
Hi there

What .xml file is the bandwidth displayed on using the XML API? It is not displayed in accountsummary xml file.
.../xml-api/showbw
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-06-2009, 10:55 AM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by Andrewcp View Post
Thanks very much David.

What are the variables in .../xml-api/showbw? For example like the account summary xml file.

<accountsummary>
<acct>
<disklimit>1000M</disklimit>
</acct>

It’s just I don't have access to cPanel and I am trying to write a script that parses the xml.

Thanks very much.
The contents of showbw look like the following:

HTML Code:
<acct>
  <deleted>0</deleted>
  <limit>BANDWIDTH-LIMIT-IN-BYTES</limit>
  <maindomain>MAIN-DOMAIN</maindomain>
  <owner>OWNER-OF-ACCOUNT</owner>
  <reseller>0 OR 1</reseller>
  <totalbytes>NUMBER-OF-BYTES-TRANSFERRED</totalbytes>
  <user>USERNAME</user>
</acct>
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-06-2009, 10:55 AM
Registered User
 
Join Date: Mar 2009
Posts: 4
Andrewcp is on a distinguished road
Thanks very much David.

What are the variables in .../xml-api/showbw? For example like the account summary xml file.

<accountsummary>
<acct>
<disklimit>1000M</disklimit>
</acct>

It’s just I don't have access to cPanel and I am trying to write a script that parses the xml.

Thanks very much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-06-2009, 11:54 AM
Registered User
 
Join Date: Mar 2009
Posts: 4
Andrewcp is on a distinguished road
Thanks

Can the xml be called by xml-api/showbw?user=xxxxx?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-06-2009, 12:06 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by Andrewcp View Post
Thanks

Can the xml be called by xml-api/showbw?user=xxxxx?
To display the bandwidth consumption for an individual user, you would use:

Code:
xml-api/showbw?search=USERNAME&searchtype=user
In this example, USERNAME is the user whose bandwidth information I desire.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-09-2009, 06:59 AM
Registered User
 
Join Date: Mar 2009
Posts: 4
Andrewcp is on a distinguished road
This there a date variable in showbw? For some reason 2009 is being displayed?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-09-2009, 10:25 AM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by Andrewcp View Post
This there a date variable in showbw? For some reason 2009 is being displayed?
You mean 2009 is being displayed in the year tag, just like 3 is currently displayed in the month tag, indicating which month this bandwidth data is for?

Yes, you can set month=MONTH_NUMBER and year=YEAR as GET parameters.
- YEAR is a 4-digit year (e.g. 2008)
- MONTH_NUMBER is a number representing a month (1 representing January .. 12 representing December).
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-27-2009, 08:18 PM
Registered User
 
Join Date: May 2009
Posts: 2
xfoxx is on a distinguished road
Quote:
Originally Posted by cPanelDavidG View Post
You mean 2009 is being displayed in the year tag, just like 3 is currently displayed in the month tag, indicating which month this bandwidth data is for?

Yes, you can set month=MONTH_NUMBER and year=YEAR as GET parameters.
- YEAR is a 4-digit year (e.g. 2008)
- MONTH_NUMBER is a number representing a month (1 representing January .. 12 representing December).
Hi,there.Can i set day as GET parameters?
How can I get the daily bandwidth with the XML-API?

Last edited by xfoxx; 05-28-2009 at 01:49 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-28-2009, 01:24 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by xfoxx View Post
Hi,there.Can i set day as GET parameters?
How can I get the daily bandwidth with the XML-API?
WHM does not generate daily bandwidth reports. Therefore, since WHM doesn't have this function - there is no API to access such information.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 05-28-2009, 08:49 PM
Registered User
 
Join Date: May 2009
Posts: 2
xfoxx is on a distinguished road
Quote:
Originally Posted by cPanelDavidG View Post
WHM does not generate daily bandwidth reports. Therefore, since WHM doesn't have this function - there is no API to access such information.
It's bad ,but thahks for your answer.I have one more, can i change the quota without using scripts/editquota.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 05-29-2009, 10:36 AM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by xfoxx View Post
It's bad ,but thahks for your answer.I have one more, can i change the quota without using scripts/editquota.
At this time, cPanel user quota modification is not available in our XML API except by means of changing the package associated with that account.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:48 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc