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:
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.
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:
It wraps the result of the requested operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (
It returns the execution status of the operation. Data type: string. Allowed values: ok | error.
It is used to return an error code when the operation fails. Data type: unsignedInt.
Can be used to return an error message if the operation fails. Data type: string.
It is always present and used to return the parameter by which the role was filtered by in the request packet. Data type: anySimple.
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.
This packet requests to remove roles with IDs 123 and 124:
<packet version="18.104.22.168"> <role> <del> <filter> <id>123</id> <id>124</id> </filter> </del> </role> </packet>
<?xml version="1.0" encoding="UTF-8"?> <packet version="22.214.171.124"> <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>