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.

Calling WHM API Function 'listips' as a reseller

Discussion in 'cPanel Developers' started by emduck, Apr 9, 2010.

  1. emduck

    emduck Member

    Joined:
    May 30, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm having trouble calling WHM API Function 'listips' as a reseller.

    When logged in as a reseller, I do not have permissions for the 'listips' function. The only way to have this permission is to be logged in as root.

    However, I don't want to give root access to my resellers.

    In WHM, when logged in as root, I gave the reseller account very liberal permissions; checking off virtually *everything* except for the Root Access checkbox--for which WHM shows a warning "All Features (warning: total and complete access)"

    Can someone tell me how to give access to listips for resellers?

    By the way, the answer is NOT to simply modify the reseller account, and allocate them a block of N IP addresses. I've already done that. This problem has to do with permissions for the "listips" WHM API function itself.

    Thanks!
    Emily
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Reseller functions with XML-API

    Hi Emily,

    You are correct, 'listips' is not allowed for resellers

    You can run the 'applist' function to determine which functions are available for the user you're authenticated as.

    Code:
    URL: http://192.168.1.1:2086/xml-api/applist
    
    Non-root/All Privs Reseller Output :
    Code:
    <applist> 
      <app>accountsummary</app> 
      <app>addpkg</app> 
      <app>applist</app> 
      <app>changepackage</app> 
      <app>cpanel</app> 
      <app>createacct</app> 
      <app>dumpzone</app> 
      <app>editpkg</app> 
      <app>fetchsslinfo</app> 
      <app>generatessl</app> 
      <app>gethostname</app> 
      <app>getlanglist</app> 
      <app>killpkg</app> 
      <app>limitbw</app> 
      <app>listaccts</app> 
      <app>listcrts</app> 
      <app>listpkgs</app> 
      <app>listsuspended</app> 
      <app>listzones</app> 
      <app>loadavg</app> 
      <app>lookupnsip</app> 
      <app>myprivs</app> 
      <app>nvget</app> 
      <app>nvset</app> 
      <app>passwd</app> 
      <app>restartservice</app> 
      <app>servicestatus</app> 
      <app>showbw</app> 
      <app>version</app> 
    </applist>
    
    Root Output:
    Code:
    <applist>
      <app>accountsummary</app>
      <app>acctcounts</app>
      <app>adddns</app>
      <app>addip</app>
      <app>addpkg</app>
      <app>addzonerecord</app>
      <app>applist</app>
      <app>changepackage</app>
      <app>configureservice</app>
      <app>cpanel</app>
      <app>createacct</app>
      <app>delip</app>
      <app>domainuserdata</app>
      <app>dumpzone</app>
      <app>editpkg</app>
      <app>editquota</app>
      <app>editzonerecord</app>
      <app>fetchsslinfo</app>
      <app>generatessl</app>
      <app>gethostname</app>
      <app>getlanglist</app>
      <app>getresellerips</app>
      <app>getzonerecord</app>
      <app>installssl</app>
      <app>killdns</app>
      <app>killpkg</app>
      <app>limitbw</app>
      <app>listaccts</app>
      <app>listacls</app>
      <app>listcrts</app>
      <app>listips</app>
      <app>listpkgs</app>
      <app>listresellers</app>
      <app>listsuspended</app>
      <app>listzones</app>
      <app>loadavg</app>
      <app>lookupnsip</app>
      <app>modifyacct</app>
      <app>myprivs</app>
      <app>nvget</app>
      <app>nvset</app>
      <app>passwd</app>
      <app>reboot</app>
      <app>removeacct</app>
      <app>removezonerecord</app>
      <app>resellerstats</app>
      <app>resetzone</app>
      <app>restartservice</app>
      <app>saveacllist</app>
      <app>servicestatus</app>
      <app>setacls</app>
      <app>sethostname</app>
      <app>setresellerips</app>
      <app>setresellerlimits</app>
      <app>setresellermainip</app>
      <app>setresellernameservers</app>
      <app>setresellerpackagelimit</app>
      <app>setresolvers</app>
      <app>setsiteip</app>
      <app>setupreseller</app>
      <app>showbw</app>
      <app>suspendacct</app>
      <app>suspendreseller</app>
      <app>terminatereseller</app>
      <app>unsetupreseller</app>
      <app>unsuspendacct</app>
      <app>unsuspendreseller</app>
      <app>version</app>
    </applist>
    
    If there's anything else I can help with, let me know.
    -Dave
     
  3. emduck

    emduck Member

    Joined:
    May 30, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks so much

    Dave,

    Thanks so much for the thorough reply. It's exactly what I needed!

    Best,
    Emily
     
  4. emduck

    emduck Member

    Joined:
    May 30, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Applist inaccurate?

    Actually, what I've noticed is that several functions, while not given by the "applist" of the reseller, are nevertheless accessible to the reseller. So far, this is true of the following functions:

    editquota
    removeacct

    Perhaps a bug with applist?

    Emily
     
  5. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Applist inaccurate

    Hi Emily,

    Good catch. I'll dig around to see if there are any bug reports related to applist's inaccuracy; I'm not aware of any, so I'll probably file one.

    Many Thanks
    -Dave
     
  6. emduck

    emduck Member

    Joined:
    May 30, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thx

    Thx, Dave. Not a high priority, of course!
    Emily
     
Loading...

Share This Page