API call to check if backup is enabled for user
Hello,
Is there an API call that can enable/disable backups for a single user?
I tried the following as per your documentation, but it doesn't seem to work:
WHM API 1 Functions - modifyacct - Software Development Kit - cPanel Documentation Thank you.
whmapi1 modifyacct user=myuser BACKUPS=0WHM API 1 Functions - modifyacct - Software Development Kit - cPanel Documentation Thank you.
-
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: whmapi1 modifyacct user=myuser BACKUP=0
Regards.0 -
Hello, I've opened a case (DOC-9389) with our documentation team to correct that entry in the document you referenced. However, note that you may find the following WHM API 1 function more helpful: WHM API 1 Functions - toggle_user_backup_state - Software Development Kit - cPanel Documentation Thank you. 0 -
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. 0
Please sign in to leave a comment.
Comments
3 comments