Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

API 2 Via URL

Discussion in 'cPanel Developers' started by lilhosty11, Nov 16, 2008.

  1. lilhosty11

    lilhosty11 Registered

    Joined:
    Nov 16, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    I have been trying to access the StatsBar Stats function of the API2 for some time, a few examples i have found have failed to work. I am trying to get the data for used email/ftp/databases on an account.

    This is what i have so far, but i dont know the args to include:

    Code:
    /xml-api/cpanel?user=username&xmlin=<cpanelaction><module>StatsBar</module><func>Stats</func></cpanelaction>
    Any help on this would be amazing thanks!
     
  2. jasonhk

    jasonhk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    Code:
    /xml-api/cpanel?user=$cPUser&xmlin=<cpanelaction><module>StatsBar</module><func>stat</func><args><display>emailaccounts|sqldatabases|</display></args></cpanelaction>
    emailaccounts might be emailac_counts, i kinda forgot, but that should give u the idea...
    Oh and add "ftpaccounts"
     
  3. lilhosty11

    lilhosty11 Registered

    Joined:
    Nov 16, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Thanks!

    Thanks alot, it works and i can now stop pulling at hair...
     
  4. jasonhk

    jasonhk Well-Known Member

    Joined:
    Nov 11, 2005
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    156
    No prob, PM me if you need other API commands :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice