Method FindGroupsAsync
FindGroupsAsync(PortalQueryParameters)
Finds portal groups from a query string.
Declaration
public Task<PortalQueryResultSet<PortalGroup>> FindGroupsAsync(PortalQueryParameters queryParams)
Parameters
Type | Name | Description |
---|---|---|
PortalQueryParameters | queryParams | The search parameters. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PortalQueryResultSet<PortalGroup>> | The task object representing the asynchronous find groups operation. The value of the task result is a PortalQueryResultSet<T>. |
Remarks
This method obtains a PortalQueryResultSet<T> object. Use the Results property to get the collection of PortalGroup objects.
PortalGroup objects are collections (aka. groups) of items, usually related to a specific area of interest such as maps, applications, and tools. Groups allow members to contribute items as a useful way to collaborate. This method allows searching for specific groups within ArcGIS Online (AGOL) or ArcGIS Portal and requires providing specific PortalQueryParameters to limit the scope of which groups are returned.
You do not have to be a logged in user to get information from this method. You can gain this information from anonymous access. However, to obtain information about groups in your organization that have a PortalAccess level of Private you need to use the AuthenticationManager by supplying the appropriate username/password credentials.
By default the Query property that is used by this method uses a default set of high performance index fields when providing simple keyword string(s) for the search. As of AGOL/ArcGIS Portal v2.1, these fields are: id, title, description, snippet, tags, and owner. For more advanced searches, developers can preface their simple keyword strings with a more exhaustive set of REST named fields followed by a colon (:). These advanced searches can also take advantage of Boolean operators (AND, NOT, OR, +), wildcard operators (* and ?), as well as other techniques to more fully utilize the AGOL/ArcGIS Portal search capabilities. Comprehensive details on using the advanced search strings that follow the REST specification can be found in the Search Reference document in the ArcGIS Portal API.
The following are a few advanced REST search scenarios with example strings that you might consider using for the Query property:
To find one specific PortalGroup by it's Id: "id:1db70a32f5f84ea9a88f5f460f22557b"
To find all Private PortalGroups with the word 'federal' in the Title field: "title:federal AND access:private"
To find all PortalGroups with the word 'federal' in the Title field and the word 'restricted' in the Description
field: "title:federal AND description:restricted"
To find all PortalGroups with the word 'state' in the Title field and not have the word 'restricted' in the Description
field: "title:state NOT description:restricted"
NOTE: It is not required to use the advanced REST search syntax to find PortalGroups with this Method. Simple string syntax for the Portal.SearchParameters.QueryString Property such as: "federal" will find all occurrences of that string in the default high performance index fields.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |
FindGroupsAsync(PortalQueryParameters, CancellationToken)
Finds portal groups that match the query parameters specified.
Declaration
public async Task<PortalQueryResultSet<PortalGroup>> FindGroupsAsync(PortalQueryParameters queryParams, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
PortalQueryParameters | queryParams | The search parameters. |
CancellationToken | cancellationToken | A CancellationToken with which to cancel the operation if required. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PortalQueryResultSet<PortalGroup>> | The task object representing the asynchronous find groups operation. The value of the task result is a PortalQueryResultSet<T>. |
Remarks
This method obtains a PortalQueryResultSet<T> object. Use the Results property to get the collection of PortalGroup objects.
PortalGroup objects are collections (aka. groups) of items, usually related to a specific area of interest such as maps, applications, and tools. Groups allow members to contribute items as a useful way to collaborate. This method allows searching for specific groups within ArcGIS Online (AGOL) or ArcGIS Portal and requires providing specific PortalQueryParameters to limit the scope of which groups are returned.
You do not have to be a logged in user to get information from this method. You can gain this information from anonymous access. However, to obtain information about groups in your organization that have a PortalAccess level of Private you need to use the AuthenticationManager by supplying the appropriate username/password credentials.
By default the Query property that is used by this method uses a default set of high performance index fields when providing simple keyword string(s) for the search. As of AGOL/ArcGIS Portal v2.1, these fields are: id, title, description, snippet, tags, and owner. For more advanced searches, developers can preface their simple keyword strings with a more exhaustive set of REST named fields followed by a colon (:). These advanced searches can also take advantage of Boolean operators (AND, NOT, OR, +), wildcard operators (* and ?), as well as other techniques to more fully utilize the AGOL/ArcGIS Portal search capabilities. Comprehensive details on using the advanced search strings that follow the REST specification can be found in the Search Reference document in the ArcGIS Portal API.
The following are a few advanced REST search scenarios with example strings that you might consider using for the Query property:
To find one specific PortalGroup by it's Id: "id:1db70a32f5f84ea9a88f5f460f22557b"
To find all Private PortalGroups with the word 'federal' in the Title field: "title:federal AND access:private"
To find all PortalGroups with the word 'federal' in the Title field and the word 'restricted' in the Description
field: "title:federal AND description:restricted"
To find all PortalGroups with the word 'state' in the Title field and not have the word 'restricted' in the Description
field: "title:state NOT description:restricted"
NOTE: It is not required to use the advanced REST search syntax to find PortalGroups with this Method. Simple string syntax for the Portal.SearchParameters.QueryString Property such as: "federal" will find all occurrences of that string in the default high performance index fields.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.14 |