Removing Roles
Use the del operation to remove roles.
Request Packet Structure
A request XML packet removing roles includes the del operation node:
<packet>
<role>
<del>
...
</del>
</role>
</packet>
The del node is nested within the RoleDelInput type (role.xsd
). This node has the following graphics representation:
-
filter, required
It specifies a filtering rule to match sites. Data type: RoleSelectionFilter (
role.xsd
). To see the structure of this node, proceed to section Available Filters. -
owner-guid, optional
It specifies the GUID of a role owner (a customer or the Administrator). If you do not specify this node, the role owner will be the request packet sender. Data type: string. For details on how to get a customer GUID, see the Getting Information About Client Accounts section.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The del node of the response packet is structured as follows:
-
result, optional
It wraps the result of the requested operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (
common.xsd
). -
status, required
It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
-
errcode, optional
It is used to return an error code when the operation fails. Data type: unsignedInt.
-
errtext, optional
Can be used to return an error message if the operation fails. Data type: string.
-
filter-id, optional
It is always present and used to return the parameter by which the role was filtered by in the request packet. Data type: anySimple.
-
id, optional
It is missing if the request packet fails before the validation on the server side. If present, this node contains the ID of a deleted site. Data type: integer.
Samples
This packet requests to remove roles with IDs 123 and 124:
<packet version="1.6.3.0">
<role>
<del>
<filter>
<id>123</id>
<id>124</id>
</filter>
</del>
</role>
</packet>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.3.0">
<role>
<del>
<result>
<status>ok</status>
<filter-id>123/filter-id>
<id>2</id>
</result>
<result>
<status>ok</status>
<filter-id>124/filter-id>
<id>2</id>
</result>
</del>
</role>
</packet>