Class: QgsArcGisPortalUtils¶
Utility functions for working with ArcGIS REST services.
See also
Added in version 3.18.
Enums
alias of   | 
Static Methods
Retrieves JSON definitions for all items which belong the the specified groupId.  | 
|
Retrieves JSON definitions for all items which belong the the specified groupId.  | 
|
Retrieves JSON definitions for all groups which the specified user name is a member of.  | 
|
Retrieves JSON user info for the specified user name.  | 
- class qgis.core.QgsArcGisPortalUtils[source]¶
 Bases:
object- ItemType¶
 alias of
ArcGisRestServiceType
- static retrieveGroupContent(contentUrl: str | None, groupId: str | None, authcfg: str | None, requestHeaders: QgsHttpHeaders = QgsHttpHeaders(), feedback: QgsFeedback | None = None, pageSize: int = 100, urlPrefix: str | None = '')[source]¶
 Retrieves JSON definitions for all items which belong the the specified
groupId.- Parameters:
 contentUrl (Optional[str]) – should be set to the Portal’s content URL, e.g. https://mysite.com/portal/sharing/rest/content
groupId (Optional[str]) – ID of group to query
authcfg (Optional[str]) – authentication configuration ID
requestHeaders (
QgsHttpHeaders= QgsHttpHeaders()) – optional additional request headersfeedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
pageSize (int = 100) – number of results to retrieve for each request. Maximum value is 100.
urlPrefix (Optional[str] = '') -> (List[Any]) – http web proxy url prefix
- Returns:
 a list of JSON item info for all items within the group
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Added in version 3.24.
- static retrieveGroupContent(contentUrl: str | None, groupId: str | None, authcfg: str | None, requestHeaders: Dict[str | None, Any], feedback: QgsFeedback | None = None, pageSize: int = 100, urlPrefix: str | None = '')[source]
 Retrieves JSON definitions for all items which belong the the specified
groupId. Only to avoid API break.- Parameters:
 contentUrl (Optional[str]) – should be set to the Portal’s content URL, e.g. https://mysite.com/portal/sharing/rest/content
groupId (Optional[str]) – ID of group to query
authcfg (Optional[str]) – authentication configuration ID
requestHeaders (Dict[Optional[str], Any]) – optional additional request headers
feedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
pageSize (int = 100) – number of results to retrieve for each request. Maximum value is 100.
urlPrefix (Optional[str] = '') -> (List[Any]) – http web proxy url prefix
- Returns:
 a list of JSON item info for all items within the group
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Deprecated since version 3.24: Use the version with
QgsHttpHeadersinstead.
- static retrieveGroupItemsOfType(contentUrl: str | None, groupId: str | None, authcfg: str | None, itemTypes: Iterable[int], requestHeaders: QgsHttpHeaders = QgsHttpHeaders(), feedback: QgsFeedback | None = None, pageSize: int = 100, urlPrefix: str | None = '')[source]¶
 Retrieves JSON definitions for all items which belong the the specified
groupId.- Parameters:
 contentUrl (Optional[str]) – should be set to the Portal’s content URL, e.g. https://mysite.com/portal/sharing/rest/content
groupId (Optional[str]) – ID of group to query
authcfg (Optional[str]) – authentication configuration ID
itemTypes (Iterable[int]) – list of desired item types (using
Qgis.ArcGisRestServiceType values)requestHeaders (
QgsHttpHeaders= QgsHttpHeaders()) – optional additional request headersfeedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
pageSize (int = 100) – number of results to retrieve for each request. Maximum value is 100.
urlPrefix (Optional[str] = '') -> (List[Any]) – http web proxy url prefix
- Returns:
 a list of JSON item info for all items within the group
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Added in version 3.24.
- static retrieveGroupItemsOfType(contentUrl: str | None, groupId: str | None, authcfg: str | None, itemTypes: Iterable[int], requestHeaders: Dict[str | None, Any], feedback: QgsFeedback | None = None, pageSize: int = 100, urlPrefix: str | None = '')[source]
 Retrieves JSON definitions for all items which belong the the specified
groupId. Only to avoid API break.- Parameters:
 contentUrl (Optional[str]) – should be set to the Portal’s content URL, e.g. https://mysite.com/portal/sharing/rest/content
groupId (Optional[str]) – ID of group to query
authcfg (Optional[str]) – authentication configuration ID
itemTypes (Iterable[int]) – list of desired item types (using
Qgis.ArcGisRestServiceType values)requestHeaders (Dict[Optional[str], Any]) – optional additional request headers
feedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
pageSize (int = 100) – number of results to retrieve for each request. Maximum value is 100.
urlPrefix (Optional[str] = '') -> (List[Any]) – http web proxy url prefix
- Returns:
 a list of JSON item info for all items within the group
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Deprecated since version 3.24: Use the version with
QgsHttpHeadersinstead.
- static retrieveUserGroups(communityUrl: str | None, user: str | None, authcfg: str | None, requestHeaders: QgsHttpHeaders = QgsHttpHeaders(), feedback: QgsFeedback | None = None, urlPrefix: str | None = '')[source]¶
 Retrieves JSON definitions for all groups which the specified user name is a member of.
If
useris blank then the user associated with the current logon details will be retrieved- Parameters:
 communityUrl (Optional[str]) – should be set to the Portal’s community URL, e.g. https://mysite.com/portal/sharing/rest/community
user (Optional[str]) – username to query, or an empty string to query the current user
authcfg (Optional[str]) – authentication configuration ID
requestHeaders (
QgsHttpHeaders= QgsHttpHeaders()) – optional additional request headersfeedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
urlPrefix (Optional[str] = '') -> (List[Any]) – http web proxy url prefix
- Returns:
 a list of JSON group info
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Added in version 3.24.
- static retrieveUserGroups(communityUrl: str | None, user: str | None, authcfg: str | None, requestHeaders: Dict[str | None, Any], feedback: QgsFeedback | None = None, urlPrefix: str | None = '')[source]
 Retrieves JSON definitions for all groups which the specified user name is a member of. Only to avoid API break.
If
useris blank then the user associated with the current logon details will be retrieved- Parameters:
 communityUrl (Optional[str]) – should be set to the Portal’s community URL, e.g. https://mysite.com/portal/sharing/rest/community
user (Optional[str]) – username to query, or an empty string to query the current user
authcfg (Optional[str]) – authentication configuration ID
requestHeaders (Dict[Optional[str], Any]) – optional additional request headers
feedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
urlPrefix (Optional[str] = '') -> (List[Any]) – http web proxy url prefix
- Returns:
 a list of JSON group info
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Deprecated since version 3.24: Use the version with
QgsHttpHeadersinstead.
- static retrieveUserInfo(communityUrl: str | None, user: str | None, authcfg: str | None, requestHeaders: QgsHttpHeaders = QgsHttpHeaders(), feedback: QgsFeedback | None = None, urlPrefix: str | None = '')[source]¶
 Retrieves JSON user info for the specified user name.
If
useris blank then the user associated with the current logon details will be retrieved- Parameters:
 communityUrl (Optional[str]) – should be set to the Portal’s community URL, e.g. https://mysite.com/portal/sharing/rest/community
user (Optional[str]) – username to query, or an empty string to query the current user
authcfg (Optional[str]) – authentication configuration ID
requestHeaders (
QgsHttpHeaders= QgsHttpHeaders()) – optional additional request headersfeedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
urlPrefix (Optional[str] = '') -> (Dict[str, Any]) – http web proxy url prefix
- Returns:
 JSON user info
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Added in version 3.24.
- static retrieveUserInfo(communityUrl: str | None, user: str | None, authcfg: str | None, requestHeaders: Dict[str | None, Any], feedback: QgsFeedback | None = None, urlPrefix: str | None = '')[source]
 Retrieves JSON user info for the specified user name. Only to avoid API break.
If
useris blank then the user associated with the current logon details will be retrieved- Parameters:
 communityUrl (Optional[str]) – should be set to the Portal’s community URL, e.g. https://mysite.com/portal/sharing/rest/community
user (Optional[str]) – username to query, or an empty string to query the current user
authcfg (Optional[str]) – authentication configuration ID
requestHeaders (Dict[Optional[str], Any]) – optional additional request headers
feedback (Optional[QgsFeedback] = None) – optional feedback argument for cancellation support
urlPrefix (Optional[str] = '') -> (Dict[str, Any]) – http web proxy url prefix
- Returns:
 JSON user info
errorTitle: title summary of any encountered errors
errorText: error text of any encountered errors
Deprecated since version 3.24: Use the version with
QgsHttpHeadersinstead.