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.

restoring an account with xml-api

Discussion in 'cPanel Developers' started by AL-Kateb, Jul 26, 2010.

  1. AL-Kateb

    AL-Kateb Active Member

    Joined:
    Feb 27, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    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. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You may be able to change the max_execution_time inside of your script via:

    PHP:
    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'},
     
  3. AL-Kateb

    AL-Kateb Active Member

    Joined:
    Feb 27, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    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. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    This call is 11.25.1 only, we just added it in the past month or so.
     
  5. AL-Kateb

    AL-Kateb Active Member

    Joined:
    Feb 27, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    the automatic updates are enabled how come i still have 11.25.0? and how do i upgrade
     
  6. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    it's in EDGE right now, unless you want to run a public beta.. I would not reccomend using it.
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
Loading...

Share This Page