Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

API call to check if backup is enabled for user

Discussion in 'cPanel Developers' started by Havri, Aug 25, 2017.

  1. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
  2. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello again,

    There is a typo the documentation page. The correct parameter backup is not "BACKUPS", but "BACKUP". Therefore, I can modify the backup state for a user like so:

    Code:
    whmapi1 modifyacct user=myuser BACKUP=0
    Regards.
     
    cPanelMichael likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,080
    Likes Received:
    1,364
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  4. Havri

    Havri Well-Known Member

    Joined:
    Oct 28, 2013
    Messages:
    58
    Likes Received:
    14
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    If I use your solution, knowing that my script only toggles the backup state, I will have to do one or two more API calls (depending on the situation) to check and set the desired backup state for the backed up user, especially if someone willingly or by mistake changes the state in WHM -> Backup User Selection for the respective user.

    Thank you for correcting the documentation and also for pointing out that there is another way of doing this. I will stick to the modify account API call as my script will directly set the backup to the desired state (enabled/disabled).

    Regards.
     
    cPanelMichael likes this.
Loading...

Share This Page