Hello all,
I am using the code below to stop a service on ArcGIS Server. This work flawlessly on this particular server.
When I try to use this code on a service on a different server, I get a KeyError: 'folders' error on line 8. Not sure what this error is indicating.
Does anyone know why this would work on one server but not the other? Thanks!
from arcgis import *
from arcgis.gis import server
s = server.Server("hhtps://server-url.com",username='username',password='password')
cdir = s.content
serv = cdir.get("Service Name",folder = "Folder")
serv.service.stop()