AnsweredAssumed Answered

Start/stop service on non-portal site

Question asked by cmathers on Mar 1, 2018
Latest reply on Mar 1, 2018 by cmathers

Ok Im tired of trying to figure this out based on the documentation for the API. All I want to do is stop a geocoding service so I can rebuild the locators and then restart it. We are not using portal here. Running the lines below returns "AttributeError: 'Server' object has no attribute 'services'" even though dir(site) shows that "services" is there. I am on v1.3.0 of the API. This is the best result I have gotten. Trying to import arcgis or from arcgis import gis and creating the server object by arcgis.gis.server.Server() always just gets me "AttributeError: module 'arcgis.gis' has no attribute 'server'".

from arcgis.gis import server
site = server.Server(url='',
                     username = '',
                     password='')
site.services.list()

Outcomes