Code stringlengths 103 85.9k | Summary listlengths 0 94 |
|---|---|
Please provide a description of the function:def generateCertificate(self, alias,
commonName, organizationalUnit,
city, state, country,
keyalg="RSA", keysize=1024,
sigalg="SHA256withRSA",
... | [
"\n Use this operation to create a self-signed certificate or as a\n starting point for getting a production-ready CA-signed\n certificate. The portal will generate a certificate for you and\n store it in its keystore.\n "
] |
Please provide a description of the function:def getAppInfo(self, appId):
params = {
"f" : "json",
"appID" : appId
}
url = self._url + "/oauth/getAppInfo"
return self._get(url=url, param_dict=params,
proxy_url=self._proxy_url,
... | [
"\n Every application registered with Portal for ArcGIS has a unique\n client ID and a list of redirect URIs that are used for OAuth. This\n operation returns these OAuth-specific properties of an application.\n You can use this information to update the redirect URIs by using\n t... |
Please provide a description of the function:def getUsersEnterpriseGroups(self, username, searchFilter, maxCount=100):
params = {
"f" : "json",
"username" : username,
"filter" : searchFilter,
"maxCount" : maxCount
}
url = self._url + "/Gro... | [
"\n This operation lists the groups assigned to a user account in the\n configured enterprise group store. You can use the filter parameter\n to narrow down the search results.\n\n Inputs:\n username - name of the user to find\n searchFilter - helps narrow down result... |
Please provide a description of the function:def refreshGroupMembership(self, groups):
params = {
"f" : "json",
"groups" : groups
}
url = self._url + "/groups/refreshMembership"
return self._post(url=url,
param_dict=params,
... | [
"\n This operation iterates over every enterprise account configured in\n the portal and determines if the user account is a part of the\n input enterprise group. If there are any change in memberships, the\n database and the indexes are updated for each group.\n While portal auto... |
Please provide a description of the function:def refreshUserMembership(self, users):
params = {
"f" : "json",
"users" : users
}
url = self._url + "/users/refreshMembership"
return self._post(url=url,
param_dict=params,
... | [
"\n This operation iterates over every enterprise group configured in\n the portal and determines if the input user accounts belong to any\n of the configured enterprise groups. If there is any change in\n membership, the database and the indexes are updated for each user\n accoun... |
Please provide a description of the function:def SSLCertificates(self):
url = self._url + "/SSLCertificate"
params = {"f" : "json"}
return self._post(url=url,
param_dict=params,
proxy_url=self._proxy_url,
prox... | [
"\n Lists certificates.\n "
] |
Please provide a description of the function:def updateSecurityConfiguration(self,
enableAutomaticAccountCreation=False,
disableServicesDirectory=False
):
url = self._url + "/config/update"
... | [
"\n This operation can be used to update the portal's security settings\n such as whether or not enterprise accounts are automatically\n registered as members of your ArcGIS organization the first time\n they accesses the portal.\n The security configuration is stored as a collect... |
Please provide a description of the function:def updateIdenityStore(self,
userPassword,
user,
userFullnameAttribute,
ldapURLForUsers,
userEmailAttribute,
user... | [
"\n You can use this operation to change the identity provider\n configuration in your portal. When Portal for ArcGIS is first\n installed, it supports token-based authentication using the\n built-in identity store for accounts. To configure your portal to\n connect to your enterp... |
Please provide a description of the function:def releaseLicense(self, username):
url = self._url + "/licenses/releaseLicense"
params = {
"username" : username,
"f" : "json"
}
return self._post(url=url,
param_dict=params,
... | [
"\n If a user checks out an ArcGIS Pro license for offline or\n disconnected use, this operation releases the license for the\n specified account. A license can only be used with a single device\n running ArcGIS Pro. To check in the license, a valid access token\n and refresh toke... |
Please provide a description of the function:def removeAllEntitlements(self, appId):
params = {
"f" : "json",
"appId" : appId
}
url = self._url + "/licenses/removeAllEntitlements"
return self._post(url=url,
param_dict=params,
... | [
"\n This operation removes all entitlements from the portal for ArcGIS\n Pro or additional products such as Navigator for ArcGIS and revokes\n all entitlements assigned to users for the specified product. The\n portal is no longer a licensing portal for that product.\n License ass... |
Please provide a description of the function:def updateLanguages(self, languages):
url = self._url = "/languages/update"
params = {
"f" : "json",
"languages" : languages
}
return self._post(url=url,
param_dict=params,
... | [
"\n You can use this operation to change which languages will have\n content displayed in portal search results.\n\n Parameters:\n languages - The JSON object containing all of the possible\n portal languages and their corresponding status (true or\n false).\n ... |
Please provide a description of the function:def updateLicenseManager(self, licenseManagerInfo):
url = self._url + "/licenses/updateLicenseManager"
params = {
"f" : "json",
"licenseManagerInfo" : licenseManagerInfo
}
return self._post(url=url,
... | [
"\n ArcGIS License Server Administrator works with your portal and\n enforces licenses for ArcGIS Pro. This operation allows you to\n change the license server connection information for your portal.\n When you import entitlements into portal using the Import\n Entitlements operat... |
Please provide a description of the function:def reindex(self, mode, includes=""):
url = self._url + "/indexer/reindex"
params = {
"f" : "json",
"mode" : mode,
"includes" : includes
}
return self._get(url=url,
param... | [
"\n This operation allows you to generate or update the indexes for\n content; such as users, groups, and items stored in the database\n (store). During the process of upgrading an earlier version of\n Portal for ArcGIS, you are required to update the indexes by\n running this ope... |
Please provide a description of the function:def updateIndexConfiguration(self,
indexerHost="localhost",
indexerPort=7199):
url = self._url + "/indexer/update"
params = {
"f" : "json",
"indexerHost": index... | [
"\n You can use this operation to change the connection information for\n the indexing service. By default, Portal for ArcGIS runs an\n indexing service that runs on port 7199. If you want the sharing\n API to refer to the indexing service on another instance, you need\n to provid... |
Please provide a description of the function:def createSite(self, username, password, fullname,
email, description, securityQuestionIdx,
secuirtyQuestionAns, contentDir
):
params = {
"username" : username,
"password" : pas... | [
"\n The create site operation initializes and configures Portal for\n ArcGIS for use. It must be the first operation invoked after\n installation. Creating a new site involves:\n\n Creating the initial administrator account\n Creating a new database administrator account (which is... |
Please provide a description of the function:def exportSite(self, location):
params = {
"location" : location,
"f" : "json"
}
url = self._url + "/exportSite"
return self._post(url=url, param_dict=params) | [
"\n This operation exports the portal site configuration to a location\n you specify.\n "
] |
Please provide a description of the function:def importSite(self, location):
params = {
"location" : location,
"f" : "json"
}
url = self._url + "/importSite"
return self._post(url=url, param_dict=params) | [
"\n This operation imports the portal site configuration to a location\n you specify.\n "
] |
Please provide a description of the function:def joinSite(self, machineAdminUrl,
username, password):
params = {
"machineAdminUrl" : machineAdminUrl,
"username" : username,
"password" : password,
"f" : "json"
}
url = self.... | [
"\n The joinSite operation connects a portal machine to an existing\n site. You must provide an account with administrative privileges to\n the site for the operation to be successful.\n "
] |
Please provide a description of the function:def federation(self):
url = self._url + "/federation"
return _Federation(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._prox... | [
"returns the class that controls federation"
] |
Please provide a description of the function:def system(self):
url = self._url + "/system"
return _System(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"\n Creates a reference to the System operations for Portal\n "
] |
Please provide a description of the function:def security(self):
url = self._url + "/security"
return _Security(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"\n Creates a reference to the Security operations for Portal\n "
] |
Please provide a description of the function:def logs(self):
url = self._url + "/logs"
return _log(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port) | [
"returns the portals log information"
] |
Please provide a description of the function:def search(self,
q=None,
per_page=None,
page=None,
bbox=None,
sort_by="relavance",
sort_order="asc"):
url = self._url + "/datasets.json"
param_dict = {
... | [
"\n searches the opendata site and returns the dataset results\n "
] |
Please provide a description of the function:def getDataset(self, itemId):
if self._url.lower().find('datasets') > -1:
url = self._url
else:
url = self._url + "/datasets"
return OpenDataItem(url=url,
itemId=itemId,
... | [
"gets a dataset class"
] |
Please provide a description of the function:def __init(self):
url = "%s/%s.json" % (self._url, self._itemId)
params = {"f": "json"}
json_dict = self._get(url, params,
securityHandler=self._securityHandler,
proxy_port=self._proxy_port,
... | [
"gets the properties for the site"
] |
Please provide a description of the function:def export(self, outFormat="shp", outFolder=None):
export_formats = {'shp':".zip", 'kml':'.kml', 'geojson':".geojson",'csv': '.csv'}
url = "%s/%s%s" % (self._url, self._itemId, export_formats[outFormat])
results = self._get(url=url,
... | [
"exports a dataset t"
] |
Please provide a description of the function:def error(self):
if self._error is None:
try:
#__init is renamed to the class with an _
init = getattr(self, "_" + self.__class__.__name__ + "__init", None)
if init is not None and callable(init):
... | [
"gets the error"
] |
Please provide a description of the function:def add_file(self, fieldname, filename, filePath, mimetype=None):
body = filePath
if mimetype is None:
mimetype = mimetypes.guess_type(filename)[0] or 'application/octet-stream'
self.files.append((fieldname, filename, mimetype, bo... | [
"Add a file to be uploaded.\n Inputs:\n fieldname - name of the POST value\n fieldname - name of the file to pass to the server\n filePath - path to the local file on disk\n mimetype - MIME stands for Multipurpose Internet Mail Extensions.\n It's a way of i... |
Please provide a description of the function:def _2(self):
boundary = self.boundary
buf = StringIO()
for (key, value) in self.form_fields:
buf.write('--%s\r\n' % boundary)
buf.write('Content-Disposition: form-data; name="%s"' % key)
buf.write('\r\n\r\... | [
"python 2.x version of formatting body data"
] |
Please provide a description of the function:def _3(self):
boundary = self.boundary
buf = BytesIO()
textwriter = io.TextIOWrapper(
buf, 'utf8', newline='', write_through=True)
for (key, value) in self.form_fields:
textwriter.write(
'--{bo... | [
" python 3 method"
] |
Please provide a description of the function:def useragent(self, value):
if value is None:
self._useragent = "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0"
elif self._useragent != value:
self._useragent = value | [
"gets/sets the user agent value"
] |
Please provide a description of the function:def _get_file_name(self, contentDisposition,
url, ext=".unknown"):
if self.PY2:
if contentDisposition is not None:
return re.findall(r'filename[^;=\n]*=(([\'"]).*?\2|[^;\n]*)',
... | [
" gets the file name from the header or url if possible "
] |
Please provide a description of the function:def _processHandler(self, securityHandler, param_dict):
cj = None
handler = None
if securityHandler is None:
cj = cookiejar.CookieJar()
elif securityHandler.method.lower() == "token" or \
securityHandler.metho... | [
"proceses the handler and returns the cookiejar"
] |
Please provide a description of the function:def _mainType(self, resp):
if self.PY2:
return resp.headers.maintype
elif self.PY3:
return resp.headers.get_content_maintype()
else:
return None | [
" gets the main type from the response object"
] |
Please provide a description of the function:def _chunk(self, response, size=4096):
method = response.headers.get("content-encoding")
if method == "gzip":
d = zlib.decompressobj(16+zlib.MAX_WBITS)
b = response.read(size)
while b:
data = d.deco... | [
" downloads a web response in pieces "
] |
Please provide a description of the function:def _post(self, url,
param_dict=None,
files=None,
securityHandler=None,
additional_headers=None,
custom_handlers=None,
proxy_url=None,
proxy_port=80,
compress=True... | [
"\n Performs a POST operation on a URL.\n\n Inputs:\n param_dict - key/value pair of values\n ex: {\"foo\": \"bar\"}\n files - key/value pair of file objects where the key is\n the input name and the value is the file path\n ex: {\"file\": r\"... |
Please provide a description of the function:def _asString(self, value):
if sys.version_info[0] == 3:
if isinstance(value, str):
return value
elif isinstance(value, bytes):
return value.decode('utf-8')
elif sys.version_info[0] == 2:
... | [
"converts the value as a string"
] |
Please provide a description of the function:def _get(self, url,
param_dict=None,
securityHandler=None,
additional_headers=None,
handlers=None,
proxy_url=None,
proxy_port=None,
compress=True,
custom_handlers=None,
... | [
"\n Performs a GET operation\n Inputs:\n\n Output:\n returns dictionary, string or None\n "
] |
Please provide a description of the function:def createSite(self,
username,
password,
configStoreConnection,
directories,
cluster=None,
logsSettings=None,
runAsync=False
... | [
"\n This is the first operation that you must invoke when you install\n ArcGIS Server for the first time. Creating a new site involves:\n\n -Allocating a store to save the site configuration\n -Configuring the server machine and registering it with the site\n -Creating a new... |
Please provide a description of the function:def machines(self):
if self._resources is None:
self.__init()
if "machines" in self._resources:
url = self._url + "/machines"
return _machines.Machines(url,
securityHandler=sel... | [
"gets a reference to the machines object"
] |
Please provide a description of the function:def data(self):
if self._resources is None:
self.__init()
if "data" in self._resources:
url = self._url + "/data"
return _data.Data(url=url,
securityHandler=self._securityHandler,
... | [
"returns the reference to the data functions as a class"
] |
Please provide a description of the function:def info(self):
if self._resources is None:
self.__init()
url = self._url + "/info"
return _info.Info(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
... | [
"\n A read-only resource that returns meta information about the server\n "
] |
Please provide a description of the function:def clusters(self):
if self._resources is None:
self.__init()
if "clusters" in self._resources:
url = self._url + "/clusters"
return _clusters.Cluster(url=url,
securityHandler=s... | [
"returns the clusters functions if supported in resources"
] |
Please provide a description of the function:def services(self):
if self._resources is None:
self.__init()
if "services" in self._resources:
url = self._url + "/services"
return _services.Services(url=url,
securityHandler... | [
"\n Gets the services object which will provide the ArcGIS Server's\n admin information about services and folders.\n "
] |
Please provide a description of the function:def usagereports(self):
if self._resources is None:
self.__init()
if "usagereports" in self._resources:
url = self._url + "/usagereports"
return _usagereports.UsageReports(url=url,
... | [
"\n Gets the services object which will provide the ArcGIS Server's\n admin information about the usagereports.\n "
] |
Please provide a description of the function:def kml(self):
url = self._url + "/kml"
return _kml.KML(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
... | [
"returns the kml functions for server"
] |
Please provide a description of the function:def logs(self):
if self._resources is None:
self.__init()
if "logs" in self._resources:
url = self._url + "/logs"
return _logs.Log(url=url,
securityHandler=self._securityHandler,
... | [
"returns an object to work with the site logs"
] |
Please provide a description of the function:def mode(self):
if self._resources is None:
self.__init()
if "mode" in self._resources:
url = self._url + "/mode"
return _mode.Mode(url=url,
securityHandler=self._securityHandler,
... | [
"returns an object to work with the site mode"
] |
Please provide a description of the function:def security(self):
if self._resources is None:
self.__init()
if "security" in self._resources:
url = self._url + "/security"
return _security.Security(url=url,
securityHandler... | [
"returns an object to work with the site security"
] |
Please provide a description of the function:def system(self):
if self._resources is None:
self.__init()
if "system" in self._resources:
url = self._url + "/system"
return _system.System(url=url,
securityHandler=self._securit... | [
"returns an object to work with the site system"
] |
Please provide a description of the function:def uploads(self):
if self._resources is None:
self.__init()
if "uploads" in self._resources:
url = self._url + "/uploads"
return _uploads.Uploads(url=url,
securityHandler=self._... | [
"returns an object to work with the site uploads"
] |
Please provide a description of the function:def getItemID(self, userContent, title=None, name=None, itemType=None):
itemID = None
if name is None and title is None:
raise AttributeError('Name or Title needs to be specified')
for item in userContent:
if title is ... | [
"Gets the ID of an item by a combination of title, name, and type.\n \n Args:\n userContent (list): A list of user content.\n title (str): The title of the item. Defaults to ``None``.\n name (str): The name of the item. Defaults to ``None``.\n itemType (str)... |
Please provide a description of the function:def getItem(self, userContent, title=None, name=None, itemType=None):
itemID = None
if name is None and title is None:
raise AttributeError('Name or Title needs to be specified')
for item in userContent:
if title is No... | [
"Gets an item by a combination of title, name, and type.\n \n Args:\n userContent (list): A list of user content.\n title (str): The title of the item. Defaults to ``None``.\n name (str): The name of the item. Defaults to ``None``.\n itemType (str): The type... |
Please provide a description of the function:def folderExist(self, name, folders):
if name is not None and name != '':
folderID = None
for folder in folders:
if folder['title'].lower() == name.lower():
return True
del folders
... | [
"Determines if a folder exists, case insensitively.\n \n Args:\n name (str): The name of the folder to check.\n folders (list): A list of folder dicts to check against. The dicts must contain\n the key:value pair ``title``.\n Returns:\n bool: ``Tr... |
Please provide a description of the function:def publishItems(self, items_info):
if self.securityhandler is None:
print ("Security handler required")
return
itemInfo = None
item_results = None
item_info = None
admin = None
try:
... | [
"Publishes a list of items.\n \n Args:\n items_info (list): A list of JSON configuration items to publish.\n \n Returns:\n list: A list of results from :py:meth:`arcrest.manageorg._content.User.addItem`.\n \n "
] |
Please provide a description of the function:def publishMap(self, maps_info, fsInfo=None, itInfo=None):
if self.securityhandler is None:
print ("Security handler required")
return
itemInfo = None
itemId = None
map_results = None
replaceInfo = None... | [
"Publishes a list of maps.\n \n Args:\n maps_info (list): A list of JSON configuration maps to publish.\n \n Returns:\n list: A list of results from :py:meth:`arcrest.manageorg._content.UserItem.updateItem`.\n \n "
] |
Please provide a description of the function:def publishCombinedWebMap(self, maps_info, webmaps):
if self.securityhandler is None:
print ("Security handler required")
return
admin = None
map_results = None
map_info = None
operationalLayers = None
... | [
"Publishes a combination of web maps.\n \n Args:\n maps_info (list): A list of JSON configuration combined web maps to publish.\n \n Returns:\n list: A list of results from :py:meth:`arcrest.manageorg._content.UserItem.updateItem`.\n \n "
] |
Please provide a description of the function:def publishFsFromMXD(self, fs_config):
fs = None
res = None
resItm = None
if self.securityhandler is None:
print ("Security handler required")
return
if self.securityhandler.is_portal:
url =... | [
"Publishes the layers in a MXD to a feauture service.\n \n Args:\n fs_config (list): A list of JSON configuration feature service details to publish.\n Returns:\n dict: A dictionary of results objects.\n\n "
] |
Please provide a description of the function:def publishFeatureCollections(self, configs):
if self.securityhandler is None:
print ("Security handler required")
return
config = None
res = None
resItm = None
try:
res = []
if ... | [
"Publishes feature collections to a feature service.\n \n Args:\n configs (list): A list of JSON configuration feature service details to publish.\n Returns:\n dict: A dictionary of results objects.\n\n "
] |
Please provide a description of the function:def publishApp(self, app_info, map_info=None, fsInfo=None):
if self.securityhandler is None:
print ("Security handler required")
return
appDet = None
try:
app_results = []
if isinstance(app_info... | [
"Publishes apps to AGOL/Portal\n \n Args:\n app_info (list): A list of JSON configuration apps to publish.\n map_info (list): Defaults to ``None``.\n fsInfo (list): Defaults to ``None``.\n Returns:\n dict: A dictionary of results objects.\n ... |
Please provide a description of the function:def updateFeatureService(self, efs_config):
if self.securityhandler is None:
print ("Security handler required")
return
fsRes = None
fst = None
fURL = None
resItm= None
try:
fsRes =... | [
"Updates a feature service.\n \n Args:\n efs_config (list): A list of JSON configuration feature service details to update.\n Returns:\n dict: A dictionary of results objects.\n \n "
] |
Please provide a description of the function:def getGroupIDs(self, groupNames,communityInfo=None):
group_ids=[]
if communityInfo is None:
communityInfo = self.communitySelf
if isinstance(groupNames,list):
groupNames = map(str.upper, groupNames)
else:
... | [
"\n This function retrieves the group IDs\n\n Inputs:\n group_names - tuple of group names\n\n Output:\n dict - list of group IDs\n "
] |
Please provide a description of the function:def createGroup(self,
title,
tags,
description="",
snippet="",
phone="",
access="org",
sortField="title",
sortOrder... | [
"\n The Create Group operation (POST only) creates a new group in the\n Portal community. Only authenticated users can create groups. The\n user who creates the group automatically becomes the owner of the\n group. The owner of the group is automatically an administrator of\n the ... |
Please provide a description of the function:def groups(self):
return Groups(url="%s/groups" % self.root,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
initalize=... | [
" returns the group object "
] |
Please provide a description of the function:def __init(self):
if self._portalId is None:
from .administration import Administration
portalSelf = Administration(url=self._securityHandler.org_url,
securityHandler=self._securityHandler,
... | [
"loads the property data into the class"
] |
Please provide a description of the function:def group(self, groupId):
url = "%s/%s" % (self.root, groupId)
return Group(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._proxy_port,
... | [
"\n gets a group based on it's ID\n "
] |
Please provide a description of the function:def update(self,
clearEmptyFields=True,
title=None,
description=None,
snippet=None,
tags=None,
phone=None,
access=None,
sortField=None,
sort... | [
"\n The Update Group operation (POST only) modifies properties such as\n the group title, tags, description, sort field and order, and\n member sharing capabilities. Available only to the group\n administrators or to the administrator of the organization if the\n user is a member.... |
Please provide a description of the function:def invite(self, users, role, expiration=1440):
params = {
"f" : "json",
"users" : users,
"role" : role,
"expiration" : expiration
}
return self._post(url=self._url + "/invite",
... | [
"\n A group administrator can invite users to join their group using\n the Invite to Group operation. This creates a new user invitation,\n which the users accept or decline. The role of the user and the\n invitation expiration date can be set in the invitation.\n A notification i... |
Please provide a description of the function:def applications(self):
url = self._url + "/applications"
params = {"f" : "json"}
res = self._get(url=url,
param_dict=params,
proxy_url=self._proxy_url,
proxy_po... | [
"returns all the group applications to join"
] |
Please provide a description of the function:def __getUsername(self):
if self._securityHandler is not None and \
not self._securityHandler._username is None:
return self._securityHandler._username
elif self._securityHandler is not None and \
hasattr(self._... | [
"tries to parse the user name from various objects"
] |
Please provide a description of the function:def user(self, username=None):
if username is None:
username = self.__getUsername()
parsedUsername = urlparse.quote(username)
url = self.root + "/%s" % parsedUsername
return User(url=url,
securityHandle... | [
"A user resource that represents a registered user in the portal."
] |
Please provide a description of the function:def userContent(self):
replace_start = self._url.lower().find("/community/")
len_replace = len("/community/")
url = self._url.replace(self._url[replace_start:replace_start+len_replace],
'/content/')
fro... | [
"allows access into the individual user's content to get at the\n items owned by the current user"
] |
Please provide a description of the function:def invitations(self):
url = "%s/invitations" % self.root
return Invitations(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
proxy_port=self._... | [
"returns a class to access the current user's invitations"
] |
Please provide a description of the function:def notifications(self):
params = {"f": "json"}
url = "%s/notifications" % self.root
return Notifications(url=url,
securityHandler=self._securityHandler,
proxy_url=self._proxy_url,
... | [
"The notifications that are available for the given user.\n Notifications are events that need the user's attention-application\n for joining a group administered by the user, acceptance of a group\n membership application, and so on. A notification is initially\n marked as new. The user... |
Please provide a description of the function:def resetPassword(self, email=True):
url = self.root + "/reset"
params = {
"f" : "json",
"email" : email
}
return self._post(url=url,
param_dict=params,
... | [
"\n resets a users password for an account. The password will be randomly\n generated and emailed by the system.\n\n Input:\n email - boolean that an email password will be sent to the\n user's profile email address. The default is True.\n\n "
] |
Please provide a description of the function:def expirePassword(self,
hours="now"):
params = {
"f" : "json"
}
expiration = -1
if isinstance(hours, str):
if expiration == "now":
expiration = -1
elif expir... | [
"sets a time when a user must reset their password"
] |
Please provide a description of the function:def update(self,
clearEmptyFields=None,
tags=None,
thumbnail=None,
password=None,
fullname=None,
email=None,
securityQuestionIdx=None,
securityAnswer=None,... | [
"\n The Update User operation (POST only) modifies properties such as\n description, preferred view, tags, access, and thumbnail. The user\n name cannot be modified. For the \"ecas\" identity provider, password,\n e-mail, and full name must be modified by editing your Esri Global\n ... |
Please provide a description of the function:def userInvitations(self):
self.__init()
items = []
for n in self._userInvitations:
if "id" in n:
url = "%s/%s" % (self.root, n['id'])
items.append(self.Invitation(url=url,
... | [
"gets all user invitations"
] |
Please provide a description of the function:def notifications(self):
self.__init()
items = []
for n in self._notifications:
if "id" in n:
url = "%s/%s" % (self.root, n['id'])
items.append(self.Notification(url=url,
... | [
"gets the user's notifications"
] |
Please provide a description of the function:def main(*argv):
try:
url = str(argv[0])
arcgisSH = ArcGISTokenSecurityHandler()
if arcgisSH.valid == False:
arcpy.AddError(arcgisSH.message)
return
fl = FeatureLayer(
url=url,
security... | [
" main driver of program "
] |
Please provide a description of the function:def stageContent(self, configFiles, dateTimeFormat=None):
results = None
groups = None
items = None
group = None
content = None
contentInfo = None
startTime = None
orgTools = None
if dateTimeF... | [
"Parses a JSON configuration file to stage content.\n\n Args:\n configFiles (list): A list of JSON files on disk containing\n configuration data for staging content.\n dateTimeFormat (str): A valid date formatting directive, as understood\n by :py:meth:`dat... |
Please provide a description of the function:def createRoles(self, configFiles, dateTimeFormat=None):
if dateTimeFormat is None:
dateTimeFormat = '%Y-%m-%d %H:%M'
scriptStartTime = datetime.datetime.now()
try:
print ("********************Create Roles***********... | [
"Parses a JSON configuration file to create roles.\n\n Args:\n configFiles (list): A list of JSON files on disk containing\n configuration data for creating roles.\n dateTimeFormat (str): A valid date formatting directive, as understood\n by :py:meth:`datet... |
Please provide a description of the function:def createGroups(self, configFiles, dateTimeFormat=None):
groupInfo = None
groupFile = None
iconPath = None
startTime = None
thumbnail = None
result = None
config = None
sciptPath = None
orgTool... | [
"Parses a JSON configuration file to create groups.\n\n Args:\n configFiles (list): A list of JSON files on disk containing\n configuration data for creating groups.\n dateTimeFormat (str): A valid date formatting directive, as understood\n by :py:meth:`dat... |
Please provide a description of the function:def publishfromconfig(self, configFiles, combinedApp=None, dateTimeFormat=None):
publishTools = None
webmaps = None
config = None
resultsItems = None
resultFS = None
resultMaps = None
resultApps = None
... | [
"Parses a JSON configuration file to publish data.\n\n Args:\n configFiles (list): A list of JSON files on disk containing\n configuration data for publishing.\n combinedApp (str): A JSON file on disk containing configuration data\n for app publishing. Defa... |
Please provide a description of the function:def add(self, statisticType, onStatisticField, outStatisticFieldName=None):
val = {
"statisticType" : statisticType,
"onStatisticField" : onStatisticField,
"outStatisticFieldName" : outStatisticFieldName
}
... | [
"\n Adds the statistics group to the filter.\n\n outStatistics - is supported on only those layers/tables that\n indicate supportsStatistics is true.\n outStatisticFieldName is empty or missing, the map server assigns a\n field name to the returned statistic field. A valid fie... |
Please provide a description of the function:def addFilter(self, layer_id, where=None, outFields="*"):
import copy
f = copy.deepcopy(self._filterTemplate)
f['layerId'] = layer_id
f['outFields'] = outFields
if where is not None:
f['where'] = where
if f... | [
" adds a layer definition filter "
] |
Please provide a description of the function:def removeFilter(self, filter_index):
f = self._filter[filter_index]
self._filter.remove(f) | [
" removes a layer filter based on position in filter list "
] |
Please provide a description of the function:def geometry(self, geometry):
if isinstance(geometry, AbstractGeometry):
self._geomObject = geometry
self._geomType = geometry.type
elif arcpyFound :
wkid = None
wkt = None
if (hasattr... | [
" sets the geometry value "
] |
Please provide a description of the function:def filter(self):
val = {"geometryType":self.geometryType,
"geometry": json.dumps(self._geomObject.asDictionary),
"spatialRel": self.spatialRelation,
"inSR" : self._geomObject.spatialReference['wkid']}
... | [
" returns the key/value pair of a geometry filter "
] |
Please provide a description of the function:def layers(self):
if self._layers is None:
self.__init()
lyrs = []
for lyr in self._layers:
url = self._url + "/%s" % lyr['id']
lyr['object'] = MobileServiceLayer(url=url,
... | [
"gets the service layers"
] |
Please provide a description of the function:def clusters(self):
if self._clusters is not None:
self.__init()
Cs = []
for c in self._clusters:
url = self._url + "/%s" % c['clusterName']
Cs.append(Cluster(url=url,
... | [
"returns the cluster object for each server"
] |
Please provide a description of the function:def editProtocol(self, clusterProtocolObj):
if isinstance(clusterProtocolObj, ClusterProtocol): pass
else:
raise AttributeError("Invalid Input, must be a ClusterProtocal Object")
url = self._url + "/editProtocol"
params = ... | [
"\n Updates the Cluster Protocol. This will cause the cluster to be\n restarted with updated protocol configuration.\n "
] |
Please provide a description of the function:def parameters(self):
if self._parameters is None:
self.__init()
for param in self._parameters:
if not isinstance(param['defaultValue'], BaseGPObject):
if param['dataType'] == "GPFeatureRecordSetLayer":
... | [
" returns the default parameters "
] |
Please provide a description of the function:def getJob(self, jobID):
url = self._url + "/jobs/%s" % (jobID)
return GPJob(url=url,
securityHandler=self._securityHandler,
proxy_port=self._proxy_port,
proxy_url=self._proxy_url) | [
" returns the results or status of a job "
] |
Please provide a description of the function:def submitJob(self, inputs, method="POST",
outSR=None, processSR=None,
returnZ=False, returnM=False):
url = self._url + "/submitJob"
params = { "f" : "json" }
if not outSR is None:
params['env:o... | [
"\n submits a job to the current task, and returns a job ID\n Inputs:\n inputs - list of GP object values\n method - string - either GET or POST. The way the service is\n submitted.\n outSR - spatial reference of output geometries\n ... |
Please provide a description of the function:def executeTask(self,
inputs,
outSR=None,
processSR=None,
returnZ=False,
returnM=False,
f="json",
method="POST"
):
... | [
"\n performs the execute task method\n "
] |
Please provide a description of the function:def _get_json(self, urlpart):
url = self._url + "/%s" % urlpart
params = {
"f" : "json",
}
return self._get(url=url,
param_dict=params,
securityHandler=self._securit... | [
"\n gets the result object dictionary\n "
] |
Please provide a description of the function:def results(self):
self.__init()
for k,v in self._results.items():
param = self._get_json(v['paramUrl'])
if param['dataType'] == "GPFeatureRecordSetLayer":
self._results[k] = GPFeatureRecordSetLayer.fromJSON(js... | [
" returns the results "
] |
Please provide a description of the function:def getParameterValue(self, parameterName):
if self._results is None:
self.__init()
parameter = self._results[parameterName]
return parameter | [
" gets a parameter value "
] |
Please provide a description of the function:def main(*argv):
try:
adminUsername = argv[0]
adminPassword = argv[1]
siteURL = argv[2]
deleteUser = argv[3]
# Logic
#
sh = arcrest.AGOLTokenSecurityHandler(adminUsername, adminPassword)
admin = arcre... | [
" main driver of program "
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.