The following example demonstrates how to delete multi-level reseller(s) and Power-User(s) and their associations.
A PHP file called Delete_Multi_Level_Reseller_And_Power_User_And_Their_Associations.php can be found here:
- for Windows: <installdir>\apisamples
- for Linux: <installdir>/apisamples
Read more in Access example API functions.
The PHP script searches and deletes objects in the system and prints the following result messages on the screen:
- "Successfully retrieved all the users" / "No user found with the specified ID" / "Failed to get the specified user"
- "Successfully retrieved all the agents" / "No agents are owned by the specified user" / "Failed to get the specified agent"
- "Successfully retrieved all the volumes" / "No Volumes are exclusively assigned to the specified user" / "Failed to get all volumes"
- "Successfully retrieved all the Disk Safes" / "No Disksafes are associated with the agents owned by the user" / "Failed to get all Disk Safes"
- "Successfully retrieved all the policies" / "No Policies are associated with the disksafe assigned to the agents owned by the user" / "Failed to get all the policies"
- "Failed to delete all policie(s)" / "All policie(s) deleted successfully"
- "Failed to delete all Disk Safe(s)" / "All Disk Safe(s) deleted successfully"
- "Failed to delete all Sub-User(s)" / "All Sub-User(s) deleted successfully"
- "Failed to delete all Agent(s)" / "All Agent(s) deleted successfully"
- "Failed to delete all Volume(s)" / "All Volume(s) deleted successfully"
- "Failed to delete Power user" / "Power user deleted successfully"
Sequence of automated actions
The following steps can be accomplished by using this script:
- Find a User with the specified ID. If a User with this ID does not exist, then exit or save the User ID.
- Find Sub-Users for the specified Power User, if there are any. Then save the found Sub-User IDs.
- Find Agents which have the specified User ID as their owner, and then save the found Agent IDs.
- Find Disk Safes which have the specified Agent ID, and then save the Disk Safe IDs.
- Find Policies associated with the found Disk Safes. Then save the found Policies' IDs.
- Delete found Policies.
- Delete found Disk Safes.
- Delete found Agents.
- Delete found Volumes.
- Delete found User.
- Delete found Sub-Users.
How to fulfill appropriate actions in the Server Backup Manager user interface
Below, you can find the steps to take in the program user interface in order to perform the same actions as the script. Also see the accompanying screen-shots illustrating the scripts for each step.
Defining server configuration variables
Retrieving a user account
To find a User by username, follow the instructions below.
1. Click on "Users" in the Main Menu to access the Users page.
2. Click on "Basic List Filter" located in the Users sub-menu.
3. Enter a username, select the "Power-User" check-box, and click "Filter."
Note While the script searches by User ID, we search by username in the Backup Manager interface. |
4. The found Users are displayed in the list.
5. Click on the User in the list, and then select the "Sub-Users" tab in the "Details" pane located in the bottom area of the interface.
Once the "Sub-Users" tab is selected, all Sub-Users will be listed there.
Retrieving servers
Select the "Servers" tab in the "Details" pane in the bottom area of the interface to list all associated Servers.
Retrieving volumes
In the bottom "Details" pane, select the "Volumes" tab to list the Volumes assigned to the selected User.
Retrieving disk safes
Click on the "Detail" icon in front of the Volume to drill down to the Disk Safes.
In the displayed window, select the "Disk Safes" tab to list the Disk Safes assigned to the selected Volume.
Retrieving policies
Deleting the policies, disk safes, and user account
1. Click on the "Delete" (red X) icon under "Actions" for the corresponding User in the list.
Alternatively, select the check-box(es) in front of the User(s) and click on the "Delete Selected" button.
2. Familiarize yourself with the information displayed on the pop-up. Click "Delete".
Note You can choose to remove any object along with the power-user. For that click the "plus" sign to expand the tree, choose an item you need and click the "Delete" button. |
3. Click "OK" in the appeared window with successful result.
Deleting a server
1. Click on the "Delete" (red X) icon under "Actions" for the corresponding Server in the list.
Alternatively, select the check-box(es) in front of the Servers and click on the "Delete Selected" button.
2. Familiarize yourself with the information displayed on the pop-up. Check the "Delete disk safes from disk" option. Click "Delete".
3. The Server will disappear from the system.
Deleting volumes
1. Click on the "Delete" (red X) icon under "Actions" for the corresponding Volume in the list.
2. Confirm your request to delete the Volume.
3. Click "OK" on the following window appeared. The volume record will disappear from the "Volumes" list.
In a few moments, the volume record disappears from the Volumes list.