Portal

The entry point into the ArcGIS portal services hosted by ArcGIS Online and ArcGIS Enterprise. ArcGIS portals are geospatial content management systems from ESRI that customers can use to securely store, manage, and access different types of content. There are two types of portals:

  • ArcGIS Online portal - a service hosted by Esri that you can access with an ArcGIS Developer account or ArcGIS Online account.

  • ArcGIS Enterprise portal - a service hosted by ArcGIS Enterprise that you can access with an ArcGIS Enterprise account.

The Portal class is the main entry point into the ArcGIS Portal Directory REST API that allows you to work with users, groups and content hosted within ArcGIS Online or ArcGIS Enterprise portals. Once instantiated, you can use the Portal to search for items and groups and see portal content, such as services, layers, and so on.

For more information about authenticating your app or its users with a portal, see the Introduction to security and authentication.

Since

200.0.0

See also

Constructors

Link copied to clipboard
constructor(url: String, connection: Portal.Connection = Connection.Anonymous)

Creates a portal object. Use this constructor to create a portal from an URL.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class Connection

The connection type used while loading the Portal.

Properties

Link copied to clipboard

Indicates the type of connection when loading the Portal.

Link copied to clipboard

A code that specifies the locale-specific formatting to use when accessing Portal content. The locale code provides localized content when viewing featured groups or items, adding or updating an item, adding a comment or rating to an item, and so on. If not explicitly set, the locale used by the device/machine is used. If the locale is not supported by the portal or set to null, the locale specified in the portal/organization settings is used. The format for locale code is based on a language code and a country code separated by a dash. Example: "en-us".

Link copied to clipboard

Details about the Portal instance, such as its name, logo, featured items, and supported protocols (http vs https).

Link copied to clipboard
val url: String

The URL of this portal.

Link copied to clipboard

The authenticated user of this portal. This value is null if no user is signed in due to anonymous access or the portal is not loaded.

Link copied to clipboard

The version of this Portal.

Inherited properties

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Functions

Link copied to clipboard
suspend fun fetchBasemaps(): Result<List<Basemap>>

Retrieves the portal's basemaps using the PortalInfo.basemapGalleryGroupQuery query string. The result is a read-only collection of Basemap objects. The basemaps are not loaded, but their PortalItem metadata are available using Basemap.item.

Link copied to clipboard

Retrieves the portal's developer basemaps using the PortalInfo.developerBasemapGalleryGroupQuery query string. A Portal instance may contain a set of associated basemaps, called developer basemaps, which are accessible and metered via API keys. These are equivalent to basemaps constructed via a BasemapStyle.

Link copied to clipboard

Retrieves the featured groups for the organization. The result is an unmodifiable list of PortalGroup objects. These are fully populated and have a load status of LoadStatus.Loaded.

Link copied to clipboard

Executes a request to fetch the featured items for this Portal. The items will have a LoadStatus of LoadStatus.Loaded

Link copied to clipboard

Executes a request to fetch the homepage featured item content for this Portal. The items will have a LoadStatus of LoadStatus.Loaded.

Link copied to clipboard

Retrieves the current portal user's LicenseInfo including its entitlements and extensions.

Link copied to clipboard

Retrieves a collection of styles using the PortalInfo.stylesGroupQuery query string. The result is an unmodifiable list of PortalItem objects.

Link copied to clipboard

Retrieves a collection of symbol sets using the PortalInfo.symbolSetsGroupQuery query string. The result is an unmodifiable list of PortalItem objects.

Link copied to clipboard

Retrieves a collection of vector basemaps using the PortalInfo.vectorBasemapGalleryGroupQuery query string.

Link copied to clipboard

This method obtains a PortalQueryResultSet object containing a collection of PortalGroup objects. Use PortalQueryResultSet.results to obtain the collection of PortalGroup objects that match the query parameters. The PortalGroup objects are fully populated and have a load status of LoadStatus.Loaded. Use the PortalQueryParameters to restrict the items returned by this method. If you provide a simple keyword string for the search, such as "federal", this method searches the default set of high performance index fields, such as id, title, description, snippet, tags, and owner.

Link copied to clipboard

Finds portal items that match the specified query parameters. This method obtains a PortalQueryResultSet object that contains PortalItem objects. Use PortalQueryResultSet.results to obtain the collection of PortalItem objects that match the query parameters. Since portal items can be maps, layers, applications or tools, use the PortalQueryParameters to restrict which items are returned. If you provide a simple keyword string for the search, such as "florida", this method searches a default set of high performance index fields, such as title, tags, snippet, description, type, and typekeywords.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.