Deleting Web Users

Use the del operation to remove one or more web users from the site.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet removing a web user includes the del operation node:

<packet version="1.4.2.0">
<webuser >
   <del>
   ...
   </del>
</webuser>
</packet>

 

The del node is presented by type WebUserDelInputType (webuser.xsd), and its graphical representation is as follows:

  • The filter node is required. It specifies a filtering rule. For more information, refer to the Available Filters section. Data type: WebUserFilter (webuser.xsd)

Remarks

You can remove multiple web users using different filtering rules in a single packet. Add as many del operations as the number of different filtering rules to be used.

<packet version="1.6.3.0">
<del>
...
</del>
...
<del>
...
</del>
</packet>

 

 

Response Packet Structure

The del node of the output XML packet is presented by type WebUserDelOutputType (webuser.xsd) and structured as follows:

  • The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (common.xsd).
  • The status node is required. It specifies the execution status of the del operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It returns the error code if the del operation fails. Data type: unsignedInt.
  • The errcode node is optional. It returns the error code if the del operation fails. Data type: unsignedInt.
  • The errtext node is optional. It returns the error message if the del operation fails. Data type: string.
  • The filter-id node is required. It returns the filtering rule parameter. For more information, refer to the Available Filters section. Data type:anySimpleType.
  • The id node is optional. If the del operation succeeds it holds the ID of the deleted web user. Data type: integer.

 

 

Samples

Deleting a web user

Send the following request to delete the web user identified by login name AbCdEf.

<packet>
<webuser>
<del>

   <filter>
      <login>AbCdEf</login>
   </filter>

</del>
</webuser>
</packet>

Response:

<packet>
<webuser>
<del>

<result>
   <status>ok</status>
   <filter-id>AbCdEf</filter-id>
   <id>253</id>
</result>

</del>
</webuser>
</packet>

 

A negative response from the server can look as follows:

<packet>
<webuser>
<del>

<result>
   <status>error</status>
   <errcode>1013</errcode>
   <errtext>Web user does not exist.</errtext>
   <filter-id>AbCdEf</filter-id>
</result>

</del>
</webuser>
</packet> 
Deleting multiple web users

The following request removes all web users from example.com and example2.com sites:

<packet>
<webuser>
<del>
   <filter>
      <site-name>example.com</site-name>
      <site-name>example2.com</site-name>
   </filter>
</del>
</webuser>
</packet>

Response (if two web users on example.com were deleted and example2.com was not found on the server):

<packet>
<webuser>
<del>

<result>
   <status>ok</status>
   <filter-id>example.com</filter-id>
   <id>156</id>
</result>

<result>
   <status>ok</status>
   <filter-id>example.com</filter-id>
   <id>157</id>
</result>

<result>
   <status>error</status>
   <errcode>1015</errcode>
   <errtext>Domain name does not exist</errtext>
   <filter-id>example2.com</filter-id>
</result>

</del>
</webuser>
</packet>