QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr, int pageSize=100)
 Retrieves JSON definitions for all items which belong the the specified groupId. More...
 
static Q_DECL_DEPRECATED QVariantList retrieveGroupContent (const QString &contentUrl, const QString &groupId, const QString &authcfg, QString &errorTitle, QString &errorText, const QMap< QString, QVariant > &requestHeaders, 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 QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr, int pageSize=100)
 Retrieves JSON definitions for all items which belong the the specified groupId. More...
 
static Q_DECL_DEPRECATED QVariantList retrieveGroupItemsOfType (const QString &contentUrl, const QString &groupId, const QString &authcfg, const QList< int > &itemTypes, QString &errorTitle, QString &errorText, const QMap< QString, QVariant > &requestHeaders, 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 QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr)
 Retrieves JSON definitions for all groups which the specified user name is a member of. More...
 
static Q_DECL_DEPRECATED QVariantList retrieveUserGroups (const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle, QString &errorText, const QMap< QString, QVariant > &requestHeaders, 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 QgsHttpHeaders &requestHeaders=QgsHttpHeaders(), QgsFeedback *feedback=nullptr)
 Retrieves JSON user info for the specified user name. More...
 
static Q_DECL_DEPRECATED QVariantMap retrieveUserInfo (const QString &communityUrl, const QString &user, const QString &authcfg, QString &errorTitle, QString &errorText, const QMap< QString, QVariant > &requestHeaders, 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 36 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 43 of file qgsarcgisportalutils.h.

Member Function Documentation

◆ retrieveGroupContent() [1/2]

QVariantList QgsArcGisPortalUtils::retrieveGroupContent ( const QString &  contentUrl,
const QString &  groupId,
const QString &  authcfg,
QString &  errorTitle,
QString &  errorText,
const QgsHttpHeaders requestHeaders = QgsHttpHeaders(),
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
Since
QGIS 3.24

Definition at line 57 of file qgsarcgisportalutils.cpp.

◆ retrieveGroupContent() [2/2]

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

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

Only to avoid API break.

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
Deprecated:
since QGIS 3.24, use the version with QgsHttpHeaders instead

Definition at line 94 of file qgsarcgisportalutils.cpp.

◆ retrieveGroupItemsOfType() [1/2]

QVariantList QgsArcGisPortalUtils::retrieveGroupItemsOfType ( const QString &  contentUrl,
const QString &  groupId,
const QString &  authcfg,
const QList< int > &  itemTypes,
QString &  errorTitle,
QString &  errorText,
const QgsHttpHeaders requestHeaders = QgsHttpHeaders(),
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
Since
QGIS 3.24

Definition at line 99 of file qgsarcgisportalutils.cpp.

◆ retrieveGroupItemsOfType() [2/2]

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

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

Only to avoid API break.

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
Deprecated:
since QGIS 3.24, use the version with QgsHttpHeaders instead

Definition at line 122 of file qgsarcgisportalutils.cpp.

◆ retrieveUserGroups() [1/2]

QVariantList QgsArcGisPortalUtils::retrieveUserGroups ( const QString &  communityUrl,
const QString &  user,
const QString &  authcfg,
QString &  errorTitle,
QString &  errorText,
const QgsHttpHeaders requestHeaders = QgsHttpHeaders(),
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
Since
QGIS 3.24

Definition at line 46 of file qgsarcgisportalutils.cpp.

◆ retrieveUserGroups() [2/2]

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

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

Only to avoid API break.

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
Deprecated:
since QGIS 3.24, use the version with QgsHttpHeaders instead

Definition at line 52 of file qgsarcgisportalutils.cpp.

◆ retrieveUserInfo() [1/2]

QVariantMap QgsArcGisPortalUtils::retrieveUserInfo ( const QString &  communityUrl,
const QString &  user,
const QString &  authcfg,
QString &  errorTitle,
QString &  errorText,
const QgsHttpHeaders requestHeaders = QgsHttpHeaders(),
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
Since
QGIS 3.24

Definition at line 22 of file qgsarcgisportalutils.cpp.

◆ retrieveUserInfo() [2/2]

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

Retrieves JSON user info for the specified user name.

Only to avoid API break.

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
Deprecated:
since QGIS 3.24, use the version with QgsHttpHeaders instead

Definition at line 41 of file qgsarcgisportalutils.cpp.


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