require(["esri/arcgis/Portal"], function(arcgisPortal) { /* code goes here */ });
Description
(Added at v2.8)
The group resource represents a group within the Portal. A group resource represents a group (e.g., "San Bernardino Fires"). The visibility of the group to other users is determined by the access property. If the group is private no one except the administrators and the members of the group will be able to see it. If the group is shared with an organization, then all members of the organization will be able to find the group. View the ArcGIS Portal API REST documentation for the
Group for more details.
Samples
Search for
samples that use this class.
Properties
Methods
Property Details
The access privileges on the group which determines who can see and access the group. Can be: private, org, or public.
The date the group was created.
A detailed description of the group.
If this is set to true, then users will not be able to apply to join the group.
Known values: true | false
Denotes a view only group where members are not able to share items. (Added at v3.4)
Known values: true | false
Default value: false
The date the group was last modified.
The username of the group's owner.
The portal for the group.
A short summary that describes the group.
User defined tags that describe the group.
The url to the thumbnail used for the group.
The title for the group. This is the name that is displayed to users and by which they refer to the group. Every group must have a title and it must be unique for a user.
Method Details
Get the current members for the group. Returns a deferred that when resolved provides access to a the
Object
listed below in the
Object Specifications table. Provides access to list the users, owner and administrator of a group. Only available to members or administrators of the group. View the ArcGIS Portal API REST documentation for the
Group Users for more details.
Object Specifications: <Object
>
<String[] > admins |
Required |
An array containing the user names for each administrator of the group. |
<String > owner |
Required |
The user name of the owner of the group. |
<String[] > users |
Required |
An array containing the user names for each user in the group. |
Sample:
require([
"dojo/_base/array", ...
], function(array, ... ) {
portalGroup.getMembers().then(function(members){
array.forEach(members.admins,function(admin){
console.log(admin);
});
});
...
});
Get the URL to the thumbnail image for the portal group.
Available width sizes: 150, 300 and 600. (Added at v3.21)
Parameters:
<Number > width |
Optional |
The desired image width. |
Execute a query against the group to return a deferred that when resolved returns
PortalQueryResult that contain a results array of
PortalItem objects that match the input query.
Parameters:
<Object > queryParams |
Optional |
The input query parameters. |
Object Specifications: <queryParams
>
<Number > num |
Required |
The maximum number of results to be included in the result set response. The Default value is 10 and the maximum allowed value is 100. The start parameter combined with the num parameter can be used to paginate the search results. Note that the actual number of returned results may be less than num if the number of results remaining after start is less than num . |
<String > q |
Required |
The query string used for a search. View the ArcGIS REST API Search Reference for details on constructing a valid query. |
<String > sortField |
Required |
A comma separated list of field(s) to sort by. Valid fields are: title, created, type, owner, avgRating, numRatings, numComments and numViews . |
<Number > start |
Required |
The number of the first entry in the result set response. The index number is 1-based. The start parameter, along with the num parameter can be used to paginate the search results. |