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.

cPanel API

Discussion in 'cPanel Developers' started by Justin Furnas, Aug 1, 2017.

  1. Justin Furnas

    Justin Furnas Registered

    Joined:
    Aug 1, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Michigan
    cPanel Access Level:
    DataCenter Provider
    I have been trying to find information on the cpanel API documentation, but haven't really found an answer I am looking for.

    How extensive is it? Am I able to extract any data from it that I can from WHM? I am working on a custom portal for my customers (for invoicing and support), and would also like to include metrics for their signed-up services. Disk space usage on each server/package that they are registered to, bandwidth usage, and system resources usage. Is all of this stuff available via the api?

    It doesn't need to be presented in a graph style, as I am using google graphs to visually represent it, but to be able to aggragate the data so I can present it as a graph is really what I am after.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,186
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello Justin,

    There's corresponding API functionality for most features in cPanel/WHM, but not all.

    Here are some WHM API 1 functions you may find useful for this purpose:

    WHM API 1 Functions - listaccts - Software Development Kit - cPanel Documentation
    WHM API 1 Functions - showbw - Software Development Kit - cPanel Documentation

    If you have resellers, this function is available:

    WHM API 1 Functions - resellerstats - Software Development Kit - cPanel Documentation

    Let us know of any specific types of information you require and we can verify if there's a WHM API 1 function for it.

    Thank you.
     
  3. Justin Furnas

    Justin Furnas Registered

    Joined:
    Aug 1, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Michigan
    cPanel Access Level:
    DataCenter Provider
    You've done an amazing job replying. I actually just found the WHM API version 1 documentation that I was playing around with. One thing I was having trouble finding, was actual server stats per account/domain, but that may be something I don't ever end up using anyways.

    What I meant, was displaying for example, this user is using 'x amount of ram' on the system, or this user is using 'x number of processes'. Again, that may not be a metric that I use anyway, so the amount of bandwidth and resources available (number of used database vs number allowed, number of domains vs number allowed), etc may really be all I need.

    Thank you for the speedy reply!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,186
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page