Hello,
I am working with a stand-alone site consisting of two 10.8.1 ArcGIS Servers; i.e., no Portal. I am currently trying to script the addition/deletion (register/unregister, whatever the appropropriate terminology is here) of some folder fileShares. I have done this in the past for 10.4.1 using Python 2.7 with the REST API but am trying to do same with the newer "ArcGIS API for Python" available with the installation. I'm new to this, having trouble working through the documentation and not finding much in the way of examples.
I have an arcgis.gis.server.Server object instantiated and I can search() on its datastores to find the "fileShares" folders but...then what? It's just a list of my datastore information as dictionaries, how do I use this to instantiate an arcgis.gis.server.Datastore so I can update() it (if that's what I want to do; same would be true for delete())?
The documentation (https://developers.arcgis.com/python/api-reference/arcgis.gis.server.html#arcgis.gis.server.Datastore) indicates the following parameters are necessary to instantiate a Database object: datastore, path, datadict=None, **kwargs. I assume the path is the "path" in the dictionary returned by the search and the datadict is the "info" in the dictionary (with the updates that I will ultimately want applied), but what is the first datastore parameter referring to? More importantly, how does the update() know what Server this Datasource is supposed to be found on?
I don't get it...
Any explanation or direction re: what I'm missing in this would be appreciated. I'm sure it's something pretty fundamental.
Cheers,
jtm