Resumen
GetPortalDescription is used to return the view of the portal as seen by the current user, anonymous or logged in. It includes information such as the name, logo, featured items, and supported protocols (HTTP versus HTTPS) for this portal. If the user is not logged in, this call will return the default view of the portal. If the user is logged in, the view of the returned portal will be specific to the organization to which the user belongs. The default view of the portal is dependent on the culture of the user, which is obtained from the user's profile.
Debate
The table below contains a list of the more important portal properties.
Property | Details |
---|---|
access | The level of access to your organization for anonymous users. If set to private, only members of the organization can access your site, while the public setting allows public access. |
allSSL | Indicates whether the organization is using HTTPS. If set to true, all calls made using resources that belong to the organization require HTTPS. The default is false. |
analysisLayersGroupQuery | The query that identifies the group containing the layers shown in the Analysis Layers gallery for the analysis tools. |
appInfo | Information about the application through which the resource was accessed. This information is based on the token used to access the resource. |
authorizedCrossOriginDomains | An array of trusted servers that clients can send credentials to when making cross-origin resource sharing (CORS) requests to access web-tier secured services. |
allowedRedirectUris | A JSON array of allowed redirect URIs that represent portal instances with which you share secure content. This allows users in your organization to use organization logins to access the secured content through web apps hosted on these portals. |
availableCredits | The total number of credits of the organization. |
backgroundImage | The background image that displays behind all other components on the home page. Accept the default background image, specify a URL for a custom background image, or specify that no background image will be used. |
basemapGalleryGroupQuery | The query that identifies the group containing the web maps that display in theMap Viewer basemap gallery. |
bingKey | The Bing key to use for web maps using Bing Maps. |
canListApps | An organization can list applications in the marketplace only if canListApps is true. |
canListData | An organization can list data services in the marketplace only if canListData is true. |
canListPreProvisionedItems | An organization can list preprovisioned items in the marketplace only if canListPreProvisionedItems is true. |
canProvisionDirectPurchase | An organization can provision direct purchases in the marketplace without customer request only if canProvisionDirectPurchase is true. |
canSearchPublic | Includes or excludes public items, groups, and users in search queries. When canSearchPublic is false, no public items outside of the organization are included in searches. However, public items that are part of the organization are returned. The default is true. |
canShareBingPublic | The Bing key can be shared to the public and is returned as part of a portal's description call (/sharing/rest/portals/<orgid>). This requires that the access property of the portal be set to public. The canShareBingPublic property is not returned publicly and is only shown to users within the organization. |
canSharePublic | Indicates whether an organization can share groups or items publicly. When canSharePublic is set to false, content cannot be shared with everyone. The default is true. |
canSignInArcGIS | Allows an organization with a configured enterprise IDP to turn on or off the ArcGIS sign in. The default is true. |
canSignInIDP | Allows an organization with a configured enterprise IDP to turn on or off the enterprise sign in. The default is true. |
colorSetsGroupQuery | The query that identifies the group containing the color sets used for rendering in Map Viewer. |
commentsEnabled | Allows the organization to disable commenting. The default is true. When commentsEnabled is false, comments are hidden but not removed, and numComments is set to zero for all items in the organization. Calls to add a comment and view comments will fail. If the organization reenables comments, the comments display and numComments is restored. |
contentCategorySetsGroupQuery | The query that identifies the group containing the ArcGIS Online content category sets. |
created | The date the organization was created, in UTC, using milliseconds since epoch. |
creditAssignments | Indicates whether the organization has credit budgeting enabled. The default is disabled. |
culture | The locale or culture code information for the organization (country-language), for example, en-us. |
cultureFormat | The preferred number and date format according to CLDR. The cultureFormat property is only applicable to English and Spanish, that is, when culture is set to en or es. See Languages for supported formats. |
customBaseUrl | The custom base URL for the portal. |
defaultBasemap | The default basemap displayed in Map Viewer. |
defaultExtent | The default extent for the organization. |
defaultUserCreditAssignment | The default allocation of credits for new members. |
defaultVectorBasemap | The default vector basemap displayed in Map Viewer when useVectorBasemaps is true. |
description | The description of the organization. |
eueiEnabled | Indicates whether the organization allows ArcGIS Online to collect usage information from its members to improve the user experience. |
featuredGroups | The featured groups for the organization. These are the groups that are highlighted on the Groups page. |
featuredItemsGroupQuery | The query that identifies the group containing featured items for the gallery. Set a Group ID or, if null, the most viewed items in your organization are displayed in the gallery. |
galleryTemplatesGroupQuery | The query that identifies whether the group containing gallery templates is allowed to build galleries that showcase the web maps and web mapping apps within a group. |
hasCategorySchema | Indicates whether the organization has a content category set up. |
helpBase | Provides the base URL of the help documentation. This is used to build all the help URLs in the portal. Starting at ArcGIS Enterprise 10.8.1, helpBase can be updated so that the default documentation source is the web version of the ArcGIS Enterprise user documentation, rather than the locally installed version of the help documentation. To learn more, see Update. Nota:The documentation source only has an impact on documentation accessed through the Enterprise portal home app and does not impact ArcGIS Server or the ArcGIS REST API documentation. |
helperServices | A JSON object of various services needed by client applications. They can be overridden by the organization or the portal. The services include the following:
|
homePageFeaturedContent | The group that contains featured content to be displayed on the home page. |
homePageFeaturedContentCount | The number of featured items that can be displayed on the home page. The maximum is 100. Only integers can be used. |
httpPort | The port used by the portal for HTTP communication. |
httpsPort | The port used by the portal for HTTPS communication. |
id | The organization ID. If null, this is the default portal for anonymous and nonorganizational users. |
ipCntryCode | The country code of the calling IP (ArcGIS Online only). |
isPortal | Indicates whether the portal is on-premises. |
isVerified | Indicates whether the organization identity is verified by Esri. |
layerTemplatesGroupQuery | The query that identifies the group containing editing templates used in Map Viewer. |
livingAtlasGroupQuery | The query that identifies the group containing the layers to be used in the Analysis Layers gallery. |
maxTokenExpirationMinutes | The maximum validity in minutes of both OAuth and nonOAuth tokens issued for users of the organization. The default value is -1, which allows a maximum of 2 weeks for OAuth access tokens and ArcGIS tokens (nonOAuth), and a maximum of 90 days for OAuth refresh tokens. These are the maximum values supported. Specifying a smaller value will impact all three types of tokens (ArcGIS, OAuth access, and OAuth refresh). |
metadataEditable | Indicates whether the organization has metadata enabled. |
metadataFormats | The metadata style used for the organization. Example: metadataFormats:["fgdc"] |
modified | The date the organization was last modified, in UTC, milliseconds since epoch. |
name | The organization's name. |
orgEmail | The contact email that appears on the Provider tab of the organization's listings in ArcGIS Marketplace. |
orgPhone | The contact phone number that appears on the Provider tab of the organization's listings in ArcGIS Marketplace. |
orgUrl | The website URL that appears on the Provider tab of the organization's listings in ArcGIS Marketplace. |
portalHostname | The portal host's URL. |
portalMode | Identifies whether it is multitenant or singletenant. |
portalName | The portal's name. |
portalProperties | Stores properties specific to the organization, for example, the contact us link. If the organization is public, the properties are visible to the anonymous user. |
portalThumbnail | The URL of the thumbnail of the portal. |
region | The region for the organization. |
rotatorPanels | The custom HTML for the home page. |
showHomePageDescription | If true, the description of the organization displays on the home page. |
storageQuota | The total storage allowed in bytes. It's usually 2 TB for organization and 2 GB for nonorganization. |
storageUsage | The total storage used in bytes. |
stylesGroupQuery | The query that identifies the group containing a variety of styles that contain references to symbology that can be used in the ArcGIS platform. |
supportsHostedServices | Indicates whether hosted services are supported. |
supportsOAuth | Indicates whether OAuth is supported. |
symbolSetsGroupQuery | The query that identifies the symbol set group for rendering in Map Viewer. |
templatesGroupQuery | The query that identifies the template group used in Map Viewer. |
thumbnail | The URL of the thumbnail of the organization. |
units | Sets the units of measure for the organization's users. The user default is derived from the organization's region. Set units to english (for U.S. standards) or metric. |
updateUserProfileDisabled | Indicates whether organization members are allowed to edit their biographical information and who can see their profiles. |
urlKey | The prefix selected by the organization's administrator to be used with the customBaseURL. |
useStandardizedQuery | If true, only simple WHERE clauses that are compliant with SQL92 can be used when querying layers and tables. The recommended security setting is true. |
useVectorBasemaps | If true, the organization uses the Esri vector basemaps in supported ArcGIS apps, and basemapGalleryGroupQuery will not be editable and will be set to the default query. |
vectorBasemapGalleryGroupQuery | The query that identifies the group containing vector basemaps that are used to display in the Map Viewer basemap gallery. This query should only be used when useVectorBasemaps is true. |
allowedOrigins | An array of up to 100 web app domains to restrict CORS access to the ArcGIS Online REST API. |
mfaAdmins | An array of at least two designated administrators who receive requests to troubleshoot members' multifactor authentication issues. |
contacts | An array of chosen administrators listed as points of contact whose email addresses will be listed as points of contact in the automatic email notifications sent to organization members when they request password resets, help with their user names, modifications to their accounts, or any issues related to the allocation of credits to their accounts. |
mfaEnabled | Indicates whether org members are allowed to set up multifactor authentication for their individual accounts. |
allowedBetaFeatures | An array of beta features that are enabled for the organization. |
user | User information for the accessing user is returned only when a token is passed in. Group information is not provided. See User for response properties. |
Sintaxis
GetPortalDescription ({portal_URL})
Parámetro | Explicación | Tipo de datos |
portal_URL | The portal URL. If unspecified the active portal will be used. | String |
Tipo de datos | Explicación |
Dictionary | A dictionary containing portal information |
Muestra de código
Get a dictionary of a portal's helper services URLs.
import arcpy
portal_desc = arcpy.GetPortalDescription()
helper_services = portal_desc['helperServices']
Get user privileges from a portal.
import arcpy
portal_desc = arcpy.GetPortalDescription()
user_name = portal_desc['user']['fullName']
user_privileges = portal_desc['user']['privileges']