Zusammenfassung
Returns a list of the folders or databases registered with an ArcGIS Server site.
Beschreibung
See About registering your data with the server to learn more about when and why you should register your data with ArcGIS Server.
Syntax
ListDataStoreItems (connection_file, datastore_type)
Parameter | Erläuterung | Datentyp |
connection_file | An ArcGIS Server connection file (.ags) for the server whose registered databases or folders you want to list. If you've made a connection in the Catalog window of ArcMap, you can use the connection file found in your user profile directory. Alternatively, you can create a connection file from scratch using the function CreateGISServerConnectionFile. | String |
datastore_type | The type of data that you want to list.
| String |
Rückgabewert
Datentyp | Erläuterung |
String | Returns the registered folders or databases as a list of lists of strings in the format [store_name, server_data, publisher_data, type].
|
Codebeispiel
ListDataStoreItems example
Prints all folders registered with the ArcGIS Server site.
import arcpy
print("Registered FOLDER items are:")
for item in arcpy.ListDataStoreItems("GIS Servers/MyConnection.ags", "FOLDER"):
print("Name: {}".format(item[0]))
print("Server's path: {}".format(item[1]))
print("Publisher's path: {}".format(item[2]))
if item[3] == "managed":
print("This is ArcGIS Server's Managed Database")