QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
Public Types | Static Public Member Functions | List of all members
QgsArcGisPortalUtils Class Reference

Utility functions for working with ArcGIS REST services. More...

#include <qgsarcgisportalutils.h>

Public Types

enum  ItemType { FeatureService , MapService , ImageService }
 Portal item types (not complete) More...
 

Static Public Member Functions

static QVariantList retrieveGroupContent (const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle, QString &errorText, const QMap< QString, QString > &requestHeaders=QMap< QString, QString >(), QgsFeedback *feedback=nullptr, int pageSize=100)
 Retrieves JSON definitions for all items which belong the the specified groupId. More...
 
static QVariantList retrieveGroupItemsOfType (const QString &contentUrl, const QString &groupId, const QString &authcfg, const QList< int > &itemTypes, QString &errorTitle, QString &errorText, const QMap< QString, QString > &requestHeaders=QMap< QString, QString >(), QgsFeedback *feedback=nullptr, int pageSize=100)
 Retrieves JSON definitions for all items which belong the the specified groupId. More...
 
static QVariantList retrieveUserGroups (const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle, QString &errorText, const QMap< QString, QString > &requestHeaders=QMap< QString, QString >(), QgsFeedback *feedback=nullptr)
 Retrieves JSON definitions for all groups which the specified user name is a member of. More...
 
static QVariantMap retrieveUserInfo (const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle, QString &errorText, const QMap< QString, QString > &requestHeaders=QMap< QString, QString >(), QgsFeedback *feedback=nullptr)
 Retrieves JSON user info for the specified user name. More...
 

Detailed Description

Utility functions for working with ArcGIS REST services.

See also
QgsArcGisRestUtils
Since
QGIS 3.18

Definition at line 35 of file qgsarcgisportalutils.h.

Member Enumeration Documentation

◆ ItemType

Portal item types (not complete)

Enumerator
FeatureService 

ArcGIS Server feature service.

MapService 

ArcGIS Server map service.

ImageService 

ArcGIS Server image service.

Definition at line 42 of file qgsarcgisportalutils.h.

Member Function Documentation

◆ retrieveGroupContent()

QVariantList QgsArcGisPortalUtils::retrieveGroupContent ( const QString &  contentUrl,
const QString &  groupId,
const QString &  authcfg,
QString &  errorTitle,
QString &  errorText,
const QMap< QString, QString > &  requestHeaders = QMap< QString, QString >(),
QgsFeedback feedback = nullptr,
int  pageSize = 100 
)
static

Retrieves JSON definitions for all items which belong the the specified groupId.

Parameters
contentUrlshould be set to the Portal's content URL, e.g. https://mysite.com/portal/sharing/rest/content/
groupIdID of group to query
authcfgauthentication configuration ID
errorTitletitle summary of any encountered errors
errorTexterror text of any encountered errors
requestHeadersoptional additional request headers
feedbackoptional feedback argument for cancellation support
pageSizenumber of results to retrieve for each request. Maximum value is 100.
Returns
a list of JSON item info for all items within the group

Definition at line 47 of file qgsarcgisportalutils.cpp.

◆ retrieveGroupItemsOfType()

QVariantList QgsArcGisPortalUtils::retrieveGroupItemsOfType ( const QString &  contentUrl,
const QString &  groupId,
const QString &  authcfg,
const QList< int > &  itemTypes,
QString &  errorTitle,
QString &  errorText,
const QMap< QString, QString > &  requestHeaders = QMap< QString, QString >(),
QgsFeedback feedback = nullptr,
int  pageSize = 100 
)
static

Retrieves JSON definitions for all items which belong the the specified groupId.

Parameters
contentUrlshould be set to the Portal's content URL, e.g. https://mysite.com/portal/sharing/rest/content/
groupIdID of group to query
authcfgauthentication configuration ID
itemTypeslist of desired item types (using QgsArcGisPortalUtils.ItemType values)
errorTitletitle summary of any encountered errors
errorTexterror text of any encountered errors
requestHeadersoptional additional request headers
feedbackoptional feedback argument for cancellation support
pageSizenumber of results to retrieve for each request. Maximum value is 100.
Returns
a list of JSON item info for all items within the group

Definition at line 84 of file qgsarcgisportalutils.cpp.

◆ retrieveUserGroups()

QVariantList QgsArcGisPortalUtils::retrieveUserGroups ( const QString &  communityUrl,
const QString &  user,
const QString &  authcfg,
QString &  errorTitle,
QString &  errorText,
const QMap< QString, QString > &  requestHeaders = QMap< QString, QString >(),
QgsFeedback feedback = nullptr 
)
static

Retrieves JSON definitions for all groups which the specified user name is a member of.

If user is blank then the user associated with the current logon details will be retrieved

Parameters
communityUrlshould be set to the Portal's community URL, e.g. https://mysite.com/portal/sharing/rest/community/
userusername to query, or an empty string to query the current user
authcfgauthentication configuration ID
errorTitletitle summary of any encountered errors
errorTexterror text of any encountered errors
requestHeadersoptional additional request headers
feedbackoptional feedback argument for cancellation support
Returns
a list of JSON group info

Definition at line 41 of file qgsarcgisportalutils.cpp.

◆ retrieveUserInfo()

QVariantMap QgsArcGisPortalUtils::retrieveUserInfo ( const QString &  communityUrl,
const QString &  user,
const QString &  authcfg,
QString &  errorTitle,
QString &  errorText,
const QMap< QString, QString > &  requestHeaders = QMap< QString, QString >(),
QgsFeedback feedback = nullptr 
)
static

Retrieves JSON user info for the specified user name.

If user is blank then the user associated with the current logon details will be retrieved

Parameters
communityUrlshould be set to the Portal's community URL, e.g. https://mysite.com/portal/sharing/rest/community/
userusername to query, or an empty string to query the current user
authcfgauthentication configuration ID
errorTitletitle summary of any encountered errors
errorTexterror text of any encountered errors
requestHeadersoptional additional request headers
feedbackoptional feedback argument for cancellation support
Returns
JSON user info

Definition at line 22 of file qgsarcgisportalutils.cpp.


The documentation for this class was generated from the following files: