Last modified October 31, 2024

Hooks


manageHook

This function allows you to create/modify the Hook Object.

listHooks

This function lists all Hook Objects.

getHook

This function prints the objects data given its Hook Object ID.

deleteHook

This function allows you to delete the object given its Hook Object ID.

Parameter Dictionary

Hook Object

Parameter name Type Description Possible Values Example
_id String The Hook ID.   5f8a21545108792bb859b1a3
name String The name assigned to Hook by the user.   Post Backup Job Hook
owner String ID of the owner of the Hook.   606dbe8b90f1b17d0569b833
owner_name String Name of the owner matching the owner ID.   root
position_type Integer When the hook should be executed.
  • 1 - pre
  • 2 - post
1
position Integer The type of Hook that will be executed.
  • 1 - Backup
  • 2 - Restore
  • 3 - Restore
  • 4 - Download
  • 5 - Reindex
  • 8 - Backup Account
  • 9 - Clone
  • 10 - Clone Account
1
data_list List [] List of data to pass to hook depending on position_type.
  • Backup - List of Backup Job IDs
  • Restore - List of boolean value for Accounts Backup
  • Download - List of boolean value for Accounts Backup Type
  • Reindex - List of Destination IDs
  • Backup Account - List of Backup Job IDs
 
script String Path the to script file.   /Path/to/script.sh
disabled Integer Boolean for is the Hook is disabled.
  • 1 - true
  • 0/null - false
1