Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Feb 2010
    Posts
    20

    Default restoring an account with xml-api

    Hello everybody, I'm trying to use the great API cPanel have for automating the process of creating and managing accounts and all that stuff.

    now i have cPanel 11.25 and the function restoreaccount works for me but i have a question regarding it.

    the information in the wiki isn't pretty clear as for restore type .. daily is 1? weekly is 2 and monthly is 3?

    it's not mentioned anywhere what are the values for the 3 types of restore plus in whm i can specify few other options like whether i want to restore mysql databases or not, i can't specify that in the API as well?

    and one more thing, say php is configured that the max execution time is 30 seconds while restoring an account might sometimes exceed that if the website has lots of data so what's the way to work around it? i did not try but i guess the php code will break out and print an error telling u that max execution time has been exceeded should i increase the max execution time? or there is another way?

    thanks in advance

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

    Default

    You may be able to change the max_execution_time inside of your script via:

    PHP Code:
    ini_set('max_execution_time'$some_large_integer); 
    This should allow you to adjust the max execution time.


    As for the rest of your issues:

    it appears that these parameters do exist but are not documented as of this point

    a complete list of parameters available for the restoreaccount xml-api call follows:

    'user' => $args->{'user'},
    'restoretype' => $args->{'type'},
    'restoreall' => $args->{'all'},
    'restoreip' => $args->{'ip'},
    'restoremail' => $args->{'mail'},
    'restoremysql' => $args->{'mysql'},
    'restoresubs' => $args->{'subs'},
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  3. #3
    Member
    Join Date
    Feb 2010
    Posts
    20

    Default

    thanks for your quick reply
    but what about the type? 1,2 and 3? which one is which is weekly ..etc

    and btw i was trying it and i thought it should work cos i have cPanel 11.25 but i got this error "Unknown App Requested: restoreaccount" what would cause this issue? though the cPanel version i have is 11.25.0-R46156.

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

    Default

    This call is 11.25.1 only, we just added it in the past month or so.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  5. #5
    Member
    Join Date
    Feb 2010
    Posts
    20

    Default

    the automatic updates are enabled how come i still have 11.25.0? and how do i upgrade

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

    Default

    it's in EDGE right now, unless you want to run a public beta.. I would not reccomend using it.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  7. #7
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb Important cPanel/WHM Version Number Designation Change

    Please Note: Important cPanel/WHM Version Number Designation Change

    As of July 28, 2010 the cPanel/WHM version number designations have been officially changed.

    Version 11.25.1 is now designated 11.28 and version 11.25.2 is now designated 11.30.

    These new changes were explained in some detail recently at the July 2010 - Quarterly Road map - Webinar direct from cPanel's PodCast Studio in Houston, Texas with speakers David Grega and Mario Rodriguez.

    An official press release about these changes is forthcoming and can be accessed at this link as soon as it's made available to the Forum Team:
    Important cPanel/WHM Version Number Designation Change (To be updated)

    This post serves to update users who are subscribed to threads (where this message is posted) looking forward to upcoming enhancements in future versions of cPanel.

Similar Threads & Tags
Similar threads

  1. XML API enabled in my account
    By bwor in forum cPanel Developers
    Replies: 6
    Last Post: 06-15-2010, 08:56 PM
  2. XML API for creating new hosting account
    By patcarbo007 in forum cPanel Developers
    Replies: 3
    Last Post: 05-22-2010, 08:07 AM
  3. restoring backup using xml-api
    By dccsi in forum cPanel Developers
    Replies: 1
    Last Post: 04-01-2009, 03:01 PM
  4. Can we list the b/w used by an account with XML-API ?
    By Indianets in forum cPanel Developers
    Replies: 4
    Last Post: 02-07-2009, 02:23 PM
  5. XML API modify account
    By JamieD in forum cPanel Developers
    Replies: 1
    Last Post: 02-15-2008, 08:52 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube