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 REST API documentation for Group.

See also:

Property Overview

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

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

more details
more detailsPortalGroup
Date

The date the group was created.

more details
more detailsPortalGroup
String

The name of the class.

more details
more detailsAccessor
String

A detailed description of the group.

more details
more detailsPortalGroup
String

The unique id for the group.

more details
more detailsPortalGroup
Boolean

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

more details
more detailsPortalGroup
Date

The date the group was last modified.

more details
more detailsPortalGroup
String

The username of the group's owner.

more details
more detailsPortalGroup
Portal

The portal associated with the group.

more details
more detailsPortalGroup
String

A short summary that describes the group.

more details
more detailsPortalGroup
String[]

User defined tags that describe the group.

more details
more detailsPortalGroup
String

The URL to the thumbnail used for the group.

more details
more detailsPortalGroup
String

The title of the group.

more details
more detailsPortalGroup
String

The URL to the group.

more details
more detailsPortalGroup

Property Details

access String

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

Possible Values:"private"|"org"|"public"

created Date

The date the group was created.

declaredClass Stringreadonly inherited
Since: ArcGIS API for JavaScript 4.7

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

description String

A detailed description of the group.

The unique id for the group.

isInvitationOnly Boolean

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

Default Value:false
modified Date

The date the group was last modified.

owner String

The username of the group's owner.

portal Portal

The portal associated with the group.

snippet String

A short summary that describes the group.

User defined tags that describe the group.

thumbnailUrl Stringreadonly
Since: ArcGIS API for JavaScript 4.4

The URL to the thumbnail used for the group.

See also:
title String

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.

url Stringreadonly

The URL to the group.

Method Overview

NameReturn TypeSummaryClass
Promise<Object[]>

If present, fetches the group's category schema.

more details
more detailsPortalGroup
Promise<Object>

Fetches the current members of the group.

more details
more detailsPortalGroup
String

Get the URL to the thumbnail image for the group.

more details
more detailsPortalGroup
Promise<PortalQueryResult>

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

more details
more detailsPortalGroup

Method Details

fetchCategorySchema(options){Promise<Object[]>}
Since: ArcGIS API for JavaScript 4.8

If present, fetches the group's category schema.

Parameters:
options Object
optional

An object with the following properties.

Specification:
optional

Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named AbortError when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.

Returns:
TypeDescription
Promise<Object[]>Resolves to an array of objects containing the following properties:
PropertyTypeDescription
titlestringThe title of the category schema.
categoriesobject[]An array of objects containing a title and an optional array of subcategories.
Example:
// Fetch featured group members
portal.fetchFeaturedGroups().then(function(groups){
  groups.forEach(function(group){
    // Fetch group category schema
    group.fetchCategorySchema().then(function(schemas){
      schemas.forEach(function(schema){
        console.log("schema: ", schema);
      })
    });
  });
});
fetchMembers(options){Promise<Object>}

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

Parameters:
options Object
optional

An object with the following properties.

Specification:
optional

Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named AbortError when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.

Returns:
TypeDescription
Promise<Object>Resolves 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, options){Promise<PortalQueryResult>}

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

Parameters:
optional
Autocasts from Object

The input query parameters defined in PortalQueryParams.

options Object
optional

An object with the following properties.

Specification:
optional

Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named AbortError when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.

Returns:
TypeDescription
Promise<PortalQueryResult>When 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
Loading...