Use the set operation to change settings for existing web users on the site.

Request Packet Structure

A request XML packet updating settings of web users includes the set operation node:

<packet version="1.6.7.0">
<webuser >
   <set>
   ...
   </set>
</webuser>
</packet>

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

image 34170

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

  • The filter node is required. It specifies the filtering rule. For more information, refer to the Available Filters section. Data type: WebUserFilter (webuser.xsd).
  • The values node is required. It specifies settings that are updated for web users. For more information, refer to the Web User Settings and Preferences section. Data type: WebUserSetParam (webuser.xsd).

Remarks

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

<packet version="1.6.7.0">
<set>
...
</set>
...
<set>
...
</set>
</packet>

Response Packet Structure

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

image 34218

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • 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 set operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. It returns the error code if the set operation fails. Data type: unsignedInt.
  • The errtext node is optional. It returns the error message if the set operation fails. Data type: string.
  • The filter-id node is required. It returns a filtering rule parameter. For more information, refer to the Available Filters section. Data type: anySimpleType.
  • The id node is optional. If the set operation succeeds it holds the ID of the updated web user. Data type: integer.

Samples

Updating settings of a single web user

An Agent sends the following request to disable CGI and fastCGI support for the web user identified by login name AbCdEf.

<packet>
<webuser>
<set>
   <filter>
      <login>AbCdEf</login>
   </filter>
   <values>
      <cgi>0</cgi>
      <fastcgi>0</fastcgi>
   </values>
</set>
</webuser>
</packet>

Response:

<packet>
<webuser>
<set>
   <result>
      <status>ok</status>
      <filter-id>AbCdEf</filter-id>
      <id>14</id>
   </result>
</set>
</webuser>
</packet>

Updating settings of multiple web users

The request packet is as follows:

<packet>
<webuser>
<set>
   <filter>
      <site-id>13</site-id>
      <site-id>14</site-id>
   </filter>
   <values>
      <mod-python>0</mod-python>
   </values>
</set>
</webuser>
</packet>

Response (if three users updated on the site with ID 14, and the site with ID 13 was not found on the server):

<packet>
<webuser>
<set>

   <result>
      <status>error</status>
      <errcode>1015</errcode>
      <errtext>Domain does not exist</errtext>
      <filter-id>13</filter-id>
   </result>

   <result>
      <status>ok</status>
      <filter-id>14</filter-id>
      <id>168</id>
   </result>

   <result>
      <status>ok</status>
      <filter-id>14</filter-id>
      <id>158</id>
   </result>

   <result>
      <status>ok</status>
      <filter-id>14</filter-id>
      <id>116</id>
   </result>

</set>
</webuser>
</packet>