The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    6
    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:
    1
    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:
    6
    No prob, PM me if you need other API commands :)
     
Loading...

Share This Page