UpdateUserGroupName1 API¶
Updates the name and member visibility setting of the specified infoRouter user group.
Endpoint¶
Methods¶
- GET
/srv.asmx/UpdateUserGroupName1?authenticationTicket=...&DomainName=...&GroupName=...&NewGroupName=...&showMembers=... - POST
/srv.asmx/UpdateUserGroupName1(form data) - SOAP Action:
http://tempuri.org/UpdateUserGroupName1
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
DomainName |
string | No | The domain/library name if the group is a local group. Pass empty or null for global groups. |
GroupName |
string | Yes | The current name of the user group to update. |
NewGroupName |
string | Yes | The new name for the user group. Pass the same value as GroupName to keep the current name. Maximum 64 characters; a longer value is refused with 4000. |
showMembers |
bool | Yes | If true, group membership is publicly visible to all users. If false, membership is private (hidden from non-members). |
Response¶
Success Response¶
Error Response¶
Required Permissions¶
Domain manager or system administrator. The calling user must be a manager of the domain containing the group, or a system administrator for global groups.
Example¶
GET Request (rename and make membership public)¶
GET /srv.asmx/UpdateUserGroupName1
?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&DomainName=Finance
&GroupName=FinanceAdmins
&NewGroupName=FinanceManagers
&showMembers=true
HTTP/1.1
GET Request (keep name, make membership private)¶
GET /srv.asmx/UpdateUserGroupName1
?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&DomainName=Finance
&GroupName=FinanceAdmins
&NewGroupName=FinanceAdmins
&showMembers=false
HTTP/1.1
POST Request¶
POST /srv.asmx/UpdateUserGroupName1 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&DomainName=Finance
&GroupName=FinanceAdmins
&NewGroupName=FinanceManagers
&showMembers=true
SOAP Request¶
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:UpdateUserGroupName1>
<tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>
<tns:DomainName>Finance</tns:DomainName>
<tns:GroupName>FinanceAdmins</tns:GroupName>
<tns:NewGroupName>FinanceManagers</tns:NewGroupName>
<tns:ShowMembers>true</tns:ShowMembers>
</tns:UpdateUserGroupName1>
</soap:Body>
</soap:Envelope>
JavaScript¶
Every call answers XML with HTTP 200, success or not, so success is the thing to branch on and
errorCode is the number to report.
async function call(action, params) {
const response = await fetch(`/srv.asmx/${action}?${new URLSearchParams(params)}`);
const root = new DOMParser()
.parseFromString(await response.text(), 'text/xml')
.documentElement;
if (root.getAttribute('success') !== 'true') {
throw new Error(`${root.getAttribute('errorCode')}: ${root.getAttribute('error')}`);
}
return root;
}
UpdateUserGroupName with the showMembers flag, which it sets as well as renaming. Sending the
same name for both is the way to change only the flag.
await call('UpdateUserGroupName1', {
authenticationTicket: ticket,
DomainName: 'Finance',
GroupName: 'Approvers',
NewGroupName: 'Approvers',
showMembers: true
});
Changed in 9.0: the flag is stored as given, as
CreateUserGroup1stores it:showMembers=falsereads back aspublic="False". Up to 8.7 it was stored inverted, so a client that sent the opposite of what it meant must now send what it means.
Notes¶
- To keep the current name unchanged, pass the same value in both
GroupNameandNewGroupName. - The
showMembersparameter corresponds to thepublicattribute in user group responses:truemaps topublic="True". - To rename the group without changing the member visibility setting, use
UpdateUserGroupName. - Pass empty
DomainNameor null for global groups.
Related APIs¶
- UpdateUserGroupName - Rename a group (without changing visibility)
- GetUserGroup - Get current group properties including
publicsetting
Error Codes¶
The errorCode values this operation returns, checked against a running server:
errorCode |
When |
|---|---|
4010 |
the ticket is expired or unknown, or there is no ticket at all |
4030 |
the caller may not manage groups - including a caller with no ticket at all |
4041 |
no group by that name in that library |
4090 |
the new name is already another group's |
HTTP 400 |
a required string parameter was empty; refused by model binding, so there is no error document |