ArcREST
ArcREST copied to clipboard
Does this work with Arcgis Online Enterprise accounts?
Does this work with ArcGIS Online Enterprise accounts? If so, could you provide a snippet of code to get us headed in the right direction? Thank you for your time.
You can use run the script inside ArcMap so it can use the login token from that. It cannot be used as a stand alone script
So using the "getting started" example below, would we simply not need the configuration line or would we still need to provide a username and password?
`import arcrest from arcresthelper import securityhandlerhelper
config = {'username': 'myusername', 'password': 'myp4ssword'} token = securityhandlerhelper.securityhandlerhelper(config) admin = arcrest.manageorg.Administration(securityHandler=token.securityhandler) content = admin.content userInfo = content.users.user() userInfo.folders`
Thanks!
You can see in this example where the script is digesting ArcMaps token.
https://github.com/Esri/ArcREST/blob/master/tools/src/append_fc_to_fs.py#L108
Are you referring to this line ?
securityinfo['security_type'] = 'ArcGIS'#LDAP, NTLM, OAuth, Portal, PKI
We're trying to filter out what we need and what we don't need from that example. Basically what we want to do is download a feature class from AGOL, using an enterprise account.
Yes, just you need to run it in ArcMap. That line gets the token from ArcMap.