Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function enables or disables legacy backups for a user.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/toggle_user_backup_state?api.version=1&user=username&legacy=0
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/toggle_user_backup_state?api.version=1&user=username&legacy=0
Expand
titleCommand Line
Code Block
languagebash
whmapi1 toggle_user_backup_state user=username legacy=0

Include Page
_WHMAPI1CLINote
_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
  "data": {
    "toggle_status": 0
  },
  "metadata": {
    "version": 1,
    "reason": "Backup state modified",
    "result": 1,
    "command": "toggle_user_backup_state"
  }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <data>
        <toggle_status>0</toggle_status>
    </data>
    <metadata>
        <version>1</version>
        <reason>Backup state modified</reason>
        <result>1</result>
        <command>toggle_user_backup_state</command>
    </metadata>
</result>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

   

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The user's username.

A valid username.
username
legacyBoolean

Whether the account should use the legacy backup system.

This value defaults to 0.

  • 1 — Use the legacy backup system.
  • 0 — Use the standard backup system.
0

Returns

ReturnTypeDescriptionPossible valuesExample
togglestatus Boolean Whether backups are active on the account.
  • 1 — Active.
  • 0 — Inactive.
0