Updating User Account Details

Use the set operation to update user account details.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet that changes user account settings should include the set operation node:

<packet>
<user>
   <set>
   ...
   </set>
</user>
</packet>

 

The set node is nested within type UserSetInput (user.xsd). This node has the following graphics representation:

user-set-rps.gif

  • filter, required

    It indicates users to be updated with the specified information. Data type: UserSelectionFilter (user.xsd). To see the structure of this node, proceed to section Available Filters.

  • values, required

    It contains a collection of settings that will be set for the filtered user accounts. Data type: UserSetValuesInput (user.xsd). See the definition of this node below.

The values node is structured as follows:

user-set-values-reps.gif

  • gen-info, optional

    It specifies a collection of general settings that will be set for the filtered accounts. Data type: UserSetGenInfo (user.xsd).

  • passwd, required

    It specifies the password of a user account. Data type: string.

  • name, required

    It specifies a user name. Data type: string.

  • contact-info, optional

    It specifies contact information for this user account. Data type: ContactInfoAdd (user.xsd). To see the node definition, refer to section User Contact Information.

  • status, optional

    It specifies the account status. Data type: string. Allowed values: 0 | 1 | enabled | disabled

    Value 0 is equal to disabled, 1 is equal to enabled.

  • external-id, optional

    It specifies the ID of the user account in the Plesk components. Data type: string.

  • login, optional

    It specifies an account username (can be an e-mail address or word containing alphanumeric, dash, dot and underscore symbols). Data type: string.

  • subscription-domain-id, optional

    It specifies the subscription id to which the user will have access. If not specified or is set to 0, it grants the user access to all subscriptions within your hosting account. Data type: string.

  • email, optional

    It specifies the email address of the user account. Data type: string.

  • roles, required

    It specifies the user account role settings. Data type: UserAddRoles (user.xsd).

  • name, required

    It specifies the name of a role assigned to the account. Data type: string.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

 

Response Packet Structure

The set node of the response packet is structured as follows:

user-set-reps.gif

  • result, required

    It wraps the result of the requested operation. Data type: extension of resultType (common.xsd).

  • status, required

    It returns the execution status of the operation. Data type: string. Allowed values: ok | error.

  • errcode, optional

    Is used to return the error code when the operation fails. Data type: unsignedInt.

  • errtext, optional

    It returns an error message if the operation fails. Data type: string.

  • filter-id, optional

    It returns a filtering rule specified in the request packet. Data type: anySimple.

  • id, optional

    It is required if the operation succeeds. Returns the unique identifier of a user account whose data is updated. Data type: integer.

 

Samples

A request packet can look as follows:

<packet version="1.6.3.0">
<user>
<set>
   <filter>
      <owner-guid>58bb9092-4c8b-4110-ba3d-c40bdad3b178</owner-guid>
   </filter>

<values>
   <roles>
     <name>WebMaster</name>
   </roles>
</values>

</set>
</user>
</packet>

Response:

<packet version="1.6.3.0">
  <user>
    <set>
      <result>
        <status>ok</status>
        <filter-id>58bb9092-4c8b-4110-ba3d-c40bdad3b178</filter-id>
        <id>20</id>
      </result>
      <result>
        <status>ok</status>
        <filter-id>58bb9092-4c8b-4110-ba3d-c40bdad3b178</filter-id>
        <id>21</id>
      </result>
    </set>
  </user>
</packet>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.