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

    Default API for suspending reseller account including clients

    Hi there

    I was not able to find such an API

    I want to suspend the whole reseller accounts.

    Reseller A
    client A1
    client A2
    client A3


    I want to suspend these all accounts. How can I do this with API ?

  2. #2
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    Vivek,
    This is not something that can be done in a single command, however it is easy enough to do:

    pseudocode:
    Code:
    $resellerinfo = xmlin( GEThttp://ip:2086/xml-api/resellerstats?reseller=$reseller)
    
    foreach $acct ($resellerinfo->{result}->{accts} ) {
     GET http://ip:2086/xml-api/suspendacct?user=$acct->{user}
    }
    GET http://ip:2086/xml-api/suspendacct?user=$reseller
    Last edited by cPanelMatt; 02-10-2009 at 12:54 PM.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  3. #3
    Member
    Join Date
    May 2007
    Posts
    23

    Default

    But I think this is something easy

    $request = "/scripts/suspendreseller?resalso=1&reseller=$uname";

  4. #4
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    That wouldn't be through our APIs however - that can be done
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

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 on a reseller account return empty string
    By gogume in forum cPanel Developers
    Replies: 4
    Last Post: 05-22-2009, 10:00 AM
  3. Replies: 1
    Last Post: 11-04-2008, 05:37 AM
  4. XML-API, Setup reseller + Account Creation Limits
    By jprl12 in forum cPanel Developers
    Replies: 1
    Last Post: 03-03-2008, 10:42 AM
  5. Suspending Reseller does not suspend sites under that reseller?
    By NightStorm in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-05-2006, 08:57 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube