I want to get group id in single call. I am using below URL
<Sitename>/_api/web/sitegroups/getbyname('Approvers')
it is returning object. I want to apply filter to above url to get group id.
If your're working with REST you can apend $select
tag to get specific properties. If would look like like this:
<Sitename>/_api/web/sitegroups/getbyname('Approvers')?$select=id
But even in this case you will get object containing at least __metadata
tag, because SharePoint REST services is based on OData
web protocol standards specification and works this way.
Get all groups of site
_api/web/sitegroups
Get All Users in Site
_api/web/siteusers
Get particular group in site
_api/Web/SiteGroups/GetById(IdOfGroup)
Remove particular user from group
executor.executeAsync({
url: "<app web url>/_api/web/sitegroups(GroupId)/users/getbyid(UserId)",
method: "POST",
headers: { "X-HTTP-Method": "DELETE" },
success: successEventHandler,
error: errorEventHandler
});
Source: Link