import PortalGroup from "@arcgis/core/portal/PortalGroup.js";const PortalGroup = await $arcgis.import("@arcgis/core/portal/PortalGroup.js");- Inheritance:
- PortalGroup→
Accessor
- Since
- ArcGIS Maps SDK 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.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| | ||
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
| | ||
thumbnailUrl readonly | | |
| | ||
url readonly | |
isInvitationOnly
- Type
- boolean
If set to true, then users will not be able to apply to join the group.
- Default value
- false
sourceJSON
- Type
- any
- Since
- ArcGIS Maps SDK for JavaScript 4.28
The JSON used to create the property values when the PortalGroup is created.
Although most commonly used properties are exposed on the PortalGroup class directly,
this provides access to all information returned for the portal group. This property is
useful if working in an application built using an older version of the API which
requires access to a portal's group properties from a more recent version.
- See also
Methods
| Method | Signature | Class |
|---|---|---|
fromJSON inherited static | fromJSON(json: any): any | |
fetchCategorySchema(options?: AbortOptions | null | undefined): Promise<object[]> | | |
fetchMembers(options?: AbortOptions | null | undefined): Promise<Members> | | |
getThumbnailUrl(width?: number): string | null | undefined | | |
queryItems(queryParams?: PortalQueryParamsProperties, options?: AbortOptions | null | undefined): Promise<PortalQueryResult<PortalItem>> | | |
toJSON inherited | toJSON(): any |
fromJSON
- Signature
-
fromJSON (json: any): any
Creates a new instance of this class and initializes it with values from a JSON object
generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a
toJSON()
method from another ArcGIS product. See the Using fromJSON()
topic in the Guide for details and examples of when and how to use this function.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. | |
- Returns
- any
Returns a new instance of this class.
fetchCategorySchema
- Signature
-
fetchCategorySchema (options?: AbortOptions | null | undefined): Promise<object[]>
- Since
- ArcGIS Maps SDK for JavaScript 4.8
If present, fetches the group's category schema.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | An object with the following properties. | |
Example
// Fetch featured group membersportal.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
- Signature
-
fetchMembers (options?: AbortOptions | null | undefined): Promise<Members>
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
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | An object with the following properties. | |
Example
// Fetch featured group membersportal.fetchFeaturedGroups().then(function(groups){ groups.forEach(function(group){ group.fetchMembers().then(function(members){ console.log("member", members); }); });}); queryItems
- Signature
-
queryItems (queryParams?: PortalQueryParamsProperties, options?: AbortOptions | null | undefined): Promise<PortalQueryResult<PortalItem>>
Executes a query against the group to return an array of PortalItem objects that match the input query.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| queryParams | The input query parameters defined in PortalQueryParams. | | |
| options | An object with the following properties. | |
- Returns
- Promise<PortalQueryResult<PortalItem>>
When resolved, resolves to an instance of PortalQueryResult which contains a
resultsarray of PortalItem objects representing all the items that match the input query.
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.