Skip To Content

RemoveDataStoreItem

Summary

Unregisters a folder or database from an ArcGIS Server site.

Syntax

RemoveDataStoreItem (connection_file, datastore_type, connection_name)
ParameterExplanationData Type
connection_file

An ArcGIS Server connection file (.ags) for the server whose database or folder is being unregistered.

String
datastore_type

The type of data being unregistered.

  • DATABASEThe data resides in an enterprise database.
  • FOLDERThe data is file-based.
String
connection_name

The name of the folder or database being unregistered, as it is currently registered with the ArcGIS Server site.

String

Code sample

RemoveDataStoreItem example

Unregisters a folder from ArcGIS Server that was using the alias "My local data folder".

import arcpy

arcpy.RemoveDataStoreItem("GIS Servers/MyConnection.ags", "FOLDER",
                          "My local data folder")

Related topics