Skip to main content

Disable backup accont with xmlapi

Comments

10 comments

  • DavidN.
    Hello, Thanks for contacting us. Please try this and let us know if it works: $xmlapi->xmlapi_query('toggle_user_backup_state', array( 'user' => 'cpuser', 'legacy' => 0 ) ); Thanks, David Nielson cPanel developer
    0
  • danielati
    Hello, Thanks for contacting us. Please try this and let us know if it works: $xmlapi->xmlapi_query('toggle_user_backup_state', array( 'user' => 'cpuser', 'legacy' => 0 ) ); Thanks, David Nielson cPanel developer

    Hello David, I tried and returned: Unknown App Requested for this version (0) of the api: toggle_user_backup_state Thanks, Daniela
    0
  • danielati
    David, when I try from this way: "$xmlapi->api1_query("cpanel_account","Backups","toggle_user_backup_state", array('user' => 'cpuser', 'legacy' => 0) );" The returns is something like this: Backups toggle_user_backup_state event internal 1 1 But nothing change in WHM.
    0
  • cPanelMichael
    Hello :) I've confirmed it works with the direct command:
    whmapi1 toggle_user_backup_state user=username legacy=0
    Could you post the full script you are using in CODE tags for review? Thank you.
    0
  • danielati
    Hello Michael :) Follow the script.... hash_auth('whm_user',$key); $xmlapi->set_output('xml'); $xmlapi->set_debug(1); Header("content-type:text/xml"); //attempt 1 //$args = array('user'=>'cpuser','BACKUPS'=>0); //print $xmlapi->xmlapi_query('modifyacct', $args); //attempt 2 //print $xmlapi->api1_query("cpuser","Backups","toggle_user_backup_state", array('user' => 'cpuser', 'legacy' => 0) ); //print $xmlapi->api1_query("cpuser","Backups","toggle_user_backup_state", array('user' => 'cpuser', 'legacy' => 1) ); //attempt 3 //print $xmlapi->xmlapi_query('toggle_user_backup_state', array( 'user' => 'cpuser', 'legacy' => 0 ) ); ?> Thanks
    0
  • danielati
    Hello :) I've confirmed it works with the direct command:
    whmapi1 toggle_user_backup_state user=username legacy=0
    Could you post the full script you are using in CODE tags for review? Thank you.

    Hello! Do you revew my code tags? When I try through in browser with the follow command (
    0
  • cPanelMichael
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0
  • danielati
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you.

    Hello Michael! Ticket ID: 7493837 Thanks
    0
  • danielati
    Hello guys! The script work. Thank you for your help and the help of ticket support's. You helped me find the solution. Follow the correct line: print $xmlapi->xmlapi_query('toggle_user_backup_state', array( 'api.version' => 1, 'user' => "username", 'legacy' => 1 ) ); It was enough to declare the version of the api in the arguments. Thanks a lot :) ;-) Daniela
    0
  • cPanelMichael
    I am happy to see the issue is now resolved. Thank you for updating this thread with the outcome.
    0

Please sign in to leave a comment.