ArcREST icon indicating copy to clipboard operation
ArcREST copied to clipboard

Does this work with Arcgis Online Enterprise accounts?

Open ghost opened this issue 7 years ago • 5 comments

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.

ghost avatar May 18 '17 17:05 ghost

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

MikeMillerGIS avatar May 18 '17 17:05 MikeMillerGIS

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!

ghost avatar May 18 '17 17:05 ghost

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

MikeMillerGIS avatar May 18 '17 17:05 MikeMillerGIS

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.

ghost avatar May 18 '17 18:05 ghost

Yes, just you need to run it in ArcMap. That line gets the token from ArcMap.

MikeMillerGIS avatar May 18 '17 18:05 MikeMillerGIS