Overwrite REST Service to protected Folder

268
0
08-12-2022 08:05 AM
Rice_GIS
New Contributor III

Trying to write a python script to overwrite a REST service under a specific folder. Does anyone know where or what I need to add if I want to overwrite my service to a specific, password protected folder on my ArcServer? I've tried to have my target_server_connection with the folder I want to add to it as "https://myorganization/rest/services/protectedfolder" but it just keeps adding to the overall rest inventory.

(Code Snippet)

# Create MapServiceDraft and set overwrite property

target_server_connection = r"https://myorganization/rest/services/"

sddraft = arcpy.sharing.CreateSharingDraft("STANDALONE_SERVER", "MapService", service_name, m)

sddraft.targetServer = target_server_connection

sddraft.overwriteExistingService = True

Like I mentioned, the code runs smooth, but I'm just trying to password protect this data behind a folder. Any suggestions are greatly appreciated!

Tags (1)
0 Kudos
0 Replies