Using REST to modify user attributes in TC 6.0.1

I understand how to use REST to get all of the details for a particular user.  What's unclear to me is how to update a user using REST.

If I GET http://teamcity:8111/httpAuth/app/rest/users/USERNAME

I get an xml document with details on the group, properties, and roles.  

If I just want to add

<property name="plugin:vcs:svn:anyVcsRoot" value="USERNAME"/>

do I need to send the entire XML document back along with the addition of the one property that I want to set?  Or can I just send only the one property?

The entire XML document might look something like this:

<user username="joe" realm="LDAP" name="Joe User" lastLogin="20130326T234039-0400" id="16" email="joe@jetbrains.com">
<groups>
<group href="/httpAuth/app/rest/userGroups/key:RPM_DEVELOPERS" name="RPM_Developers" key="RPM_DEVELOPERS"/>
<group href="/httpAuth/app/rest/userGroups/key:TEAMCITY_ADMINIS" name="TeamCity Administrators" key="TEAMCITY_ADMINIS"/>
<group href="/httpAuth/app/rest/userGroups/key:ALL_USERS_GROUP" name="All Users" key="ALL_USERS_GROUP"/>

</groups>
<properties>
<property name="changesTreeState" value="ct_node_11705_false:"/>
<property name="visible.projects.configured" value="true"/>
<property name="buildHistory.showAllBuilds" value="true"/>
<property name="plugin:notificator:jabber:jabber-account" value=""/>
<property name="plugin:vcs:clearcase:anyVcsRoot" value="joe"/>
<property name="plugin:vcs:svn:anyVcsRoot" value="joe"/>

</properties>
<roles>
<role href="/httpAuth/app/rest/users/id:16/roles/SYSTEM_ADMIN/g" scope="g" roleId="SYSTEM_ADMIN"/>

</roles>

</user>

Please sign in to leave a comment.