PortalGroup

Class: esri/portal/PortalGroup
Inheritance: PortalGroup Accessor
Since: ArcGIS API for JavaScript 4.0

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, than all members of the organization are able to find the group. For additional information, see the ArcGIS Portal API REST documentation for Group.

See also:

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummary
String

The access privileges on the group which determines who can see and access the group.

more details
more details
Date

The date the group was created.

more details
more details
String

The name of the class.

more details
more details
String

A detailed description of the group.

more details
more details
String

The unique id for the group.

more details
more details
Boolean

If set to true, then users will not be able to apply to join the group.

more details
more details
Date

The date the group was last modified.

more details
more details
String

The username of the group's owner.

more details
more details
Portal

The portal associated with the group.

more details
more details
String

A short summary that describes the group.

more details
more details
String[]

User defined tags that describe the group.

more details
more details
String

The URL to the thumbnail used for the group.

more details
more details
String

The title of the group.

more details
more details
String

The URL to the group.

more details
more details

Property Details

accessString

The access privileges on the group which determines who can see and access the group.

Known Values: private | org | public

createdDate

The date the group was created.

declaredClassStringreadonly

The name of the class. The declared class name is formatted as esri.folder.className.

descriptionString

A detailed description of the group.

The unique id for the group.

isInvitationOnlyBoolean

If set to true, then users will not be able to apply to join the group.

Default Value: false

modifiedDate

The date the group was last modified.

ownerString

The username of the group's owner.

portalPortal

The portal associated with the group.

snippetString

A short summary that describes the group.

User defined tags that describe the group.

thumbnailUrlStringreadonly

Since: ArcGIS API for JavaScript 4.4

The URL to the thumbnail used for the group.

See also:

titleString

The title of the group. This is the name that is displayed to users. It is also used to refer to the group. Every group must have a title and it must be unique.

urlStringreadonly

The URL to the group.

Method Overview

NameReturn TypeSummary
Promise

Fetches the current members of the group.

more details
more details
String

Get the URL to the thumbnail image for the group.

more details
more details
Promise

Executes a query against the group to return an array of PortalItem objects that match the input query.

more details
more details

Method Details

fetchMembers(){Promise}

Fetches the current members of the group. This method is only available to members or administrators of the group. View the ArcGIS Portal API REST documentation for the Group Users for more details.

Returns:
TypeDescription
PromiseResolves to an object with the following properties:
PropertyTypeDescription
adminsString[]An array containing the user names for each administrator of the group.
ownerStringThe user name of the owner of the group.
usersString[]An array containing the user names for each user in the group.
Example:
// Fetch featured group members
portal.fetchFeaturedGroups().then(function(groups){
   groups.forEach(function(group){
     group.fetchMembers().then(function(members){
       console.log("member", members);
     });
   });
});

getThumbnailUrl(width){String}

Since: ArcGIS API for JavaScript 4.4

Get the URL to the thumbnail image for the group.

Available width sizes: 150, 300 and 600.

Parameter:
width Number
optional

The desired image width.

Returns:
TypeDescription
StringThe URL to the thumbnail image.

queryItems(queryParams){Promise}

Executes a query against the group to return an array of PortalItem objects that match the input query.

Parameter:
queryParams PortalQueryParams
optional

The input query parameters defined in PortalQueryParams. This object may be autocast.

Returns:
TypeDescription
PromiseWhen resolved, resolves to an instance of PortalQueryResult which contains a results array of PortalItem objects representing all the items that match the input query.

API Reference search results

NameTypeModule

There were no match results from your search criteria.