This documentation is for ArcGIS REST JS 3.x which is no longer maintained. For the latest 4.x documentation see ArcGIS REST JS on the ArcGIS Developer website.

searchGroups

Function
import { searchGroups } from "@esri/arcgis-rest-portal";
//
searchGroups('water')
  .then(response) // response.total => 355

Search a portal for groups. See the REST Documentation for more information.

Parameters

Parameter Type Default Notes

Returns

A Promise that will resolve with the data from the response.

Promise<ISearchResult<IGroup>>
Property Type Notes
nextStart number
num number
query string
results IItem[] | IGroup[] | IUser[] | IItem | IGroup | IUser
start number
total number
aggregations Optional {
counts:
Array<{
fieldName:
string
fieldValues:
Array<{
count:
number
value:
any
}>
}>
}

Aggregations will only be present on item searches when fieldCounts are requested.

nextPage Optional function() : Promise<ISearchResult<IItem | IGroup | IUser>>

Function defined in packages/arcgis-rest-portal/src/groups/search.ts:25