Planfix API user.updateGroupMembership: Difference between revisions
From Planfix
								
												
				| No edit summary |  (→Go To) | ||
| Line 65: | Line 65: | ||
| == Go To == | == Go To == | ||
| *[[Planfix API:Employees]] | *[[Planfix API:Employees]] | ||
| *[[Error codes]] | *[[Error codes XML API v1|Error codes]] | ||
| *[[List of functions]] | *[[List of functions]] | ||
Latest revision as of 09:28, 6 March 2024
Change the user's affiliation with the group. Can be called by a user with administrator rights. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="user.updateGroupMembership ">
  <account></account>
  <sid></sid>
  <user>
    <id></id>
    <addUserGroup>
      <id></id>
      <id></id>
      <!-- ... -->
    </addUserGroup>
    <delUserGroup>
      <id></id>
      <id></id>
      <!-- ... -->
    </delUserGroup>
  </user>
  <signature></signature>
</request>| Name | Type | Value | Note | 
|---|---|---|---|
| user.id | int | user identifier | |
| user.addUserGroup | list of groups the user is joining | ||
| user.addUserGroup.id | int | group identifier | |
| user.delUserGroup | list of groups the user is leaving | ||
| user.delUserGroup.id | int | group identifier | 
Response, if the request is successful:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <user>
    <id></id>
  </user>
</response>| Name | Type | Value | Note | 
|---|---|---|---|
| user.id | int | user identifier | 
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>