Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2005
    Posts
    6

    Default Calling WHM API Function 'listips' as a reseller

    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. #2
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default 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
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  3. #3
    Member
    Join Date
    May 2005
    Posts
    6

    Default Thanks so much

    Dave,

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

    Best,
    Emily

  4. #4
    Member
    Join Date
    May 2005
    Posts
    6

    Default 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. #5
    Integration Developer cPanelDavidN's Avatar
    Join Date
    Dec 2009
    Location
    Houston, TX
    Posts
    525

    Default 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
    David Neimeyer
    Integration Developer

    sdk.cpanel.net
    APIs: XML-API API1 & API2
    Check Out: Developer Downloads Integration Blog
    Need Support? Support Ticket Developer Forum Feature Request

  6. #6
    Member
    Join Date
    May 2005
    Posts
    6

    Default Thx

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

Similar Threads & Tags
Similar threads

  1. XML API class works with a WHM cPanel reseller account?
    By bcosmo in forum cPanel Developers
    Replies: 1
    Last Post: 03-17-2010, 09:33 AM
  2. /xml-api/listips - returns empty string
    By steelaz in forum cPanel Developers
    Replies: 7
    Last Post: 01-16-2009, 01:42 PM
  3. api function for upgrading accounts
    By manoj_kmwt in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-25-2006, 12:45 AM
  4. Problem calling createacct() inside another function.
    By HostSauce in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-28-2006, 04:25 PM
  5. Other function with API
    By jprl12 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 02-04-2005, 05:13 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube