RemoveUsergroupFromFolderSubscribers API¶
Removes the specified user group from the subscription list of a folder. After removal, members of that group will no longer receive email notifications via the group subscription for any events on that folder. Optionally removes the group from all sub-folders and documents within the folder as well.
Endpoint¶
Methods¶
-
GET
/srv.asmx/RemoveUsergroupFromFolderSubscribers?AuthenticationTicket=...&FolderPath=...&groupName=...&IncludeSubObjects=... -
POST
/srv.asmx/RemoveUsergroupFromFolderSubscribers(form data) -
SOAP Action:
http://tempuri.org/RemoveUsergroupFromFolderSubscribers
Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
AuthenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
FolderPath |
string | Yes | Full infoRouter path to the folder (e.g. /Finance/Reports). The folder must already exist. |
groupName |
string | Yes | Name of the user group. A group belonging to the library the item is in is looked for first, then the global groups, so either kind can be named. |
IncludeSubObjects |
bool | Yes | When true, also removes the group subscription from all sub-folders and documents nested within the specified folder. When false, only the subscription on the specified folder itself is removed. |
Response¶
Success Response¶
Error Response¶
Required Permissions¶
The calling user must be authenticated. To remove a user group from a folder's subscription list, the calling user must have write access or manage access to the folder.
Example¶
GET Request¶
GET /srv.asmx/RemoveUsergroupFromFolderSubscribers
?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&FolderPath=/Finance/Reports
&groupName=Finance-Managers
&IncludeSubObjects=true
HTTP/1.1
POST Request¶
POST /srv.asmx/RemoveUsergroupFromFolderSubscribers HTTP/1.1
Content-Type: application/x-www-form-urlencoded
AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&FolderPath=/Finance/Reports
&groupName=Finance-Managers
&IncludeSubObjects=true
SOAP Request¶
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:RemoveUsergroupFromFolderSubscribers>
<tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>
<tns:FolderPath>/Finance/Reports</tns:FolderPath>
<tns:groupName>Finance-Managers</tns:groupName>
<tns:IncludeSubObjects>true</tns:IncludeSubObjects>
</tns:RemoveUsergroupFromFolderSubscribers>
</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;
}
Unsubscribes a user group from a folder, and optionally from everything inside it.
await call('RemoveUsergroupFromFolderSubscribers', {
authenticationTicket: ticket,
FolderPath: '/Public/Reports',
groupName: 'Auditors',
IncludeSubObjects: true,
});
Notes¶
-
Not subscribed: removing a group that is not subscribed is a success, not an error.
-
Group Must Exist: The
groupNamemust match an existing infoRouter user group (local or global). If the group is not found, an error is returned. -
IncludeSubObjects: when
true, the removal is applied to every sub-folder and document in the tree, matching the add. -
Individual User Subscriptions Unaffected: This API only removes the group-level subscription. Individual users who are members of the group and have their own personal subscriptions will continue to receive notifications. Use
RemoveUserFromFolderSubscribersto remove individual user subscriptions. -
Either kind of group: the folder's own library is searched first and then the global groups.
-
Document Group Subscriptions: This API operates on folder subscriptions only. To remove a group from a document subscription, use
RemoveUsergroupFromDocumentSubscribers.
Related APIs¶
-
AddUsergroupToFolderSubscribers - Add a user group to a folder's subscription list
-
RemoveUserFromFolderSubscribers - Remove an individual user from a folder's subscription list
-
RemoveUsergroupFromDocumentSubscribers - Remove a user group from a document's subscription list
-
GetSubscribers - Get the full subscriber list of a document or folder
-
GetSubscriptions - Get all subscriptions for the current user
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 |
4041 |
no folder at that path, including one the caller may not see |
4041 |
no user group by that name, in the folder's library or among the global groups |
HTTP 400 |
a required string parameter was empty; refused by model binding, so there is no error document |