Greetings,
I used the ESRI Python code to get a list of Services. URL: arcgis.gis.server module — arcgis 1.8.5 documentation
Using the same code:
gis = GIS(portalURL, username, password)
##print('Connected to {} as {}'.format(gis_name.properties.portalHostname, gis_name.users.me.username))
print("Logged IN")
#print(gis.admin.servers.validate()) ### true
gis_server = gis.admin.servers.list()
print(gis_server)
server1 = gis_server[0]
services = server1.services.list()
print(services)
The server name is returned, throws an error on the following line:
services = server1.services.list()
Error message:
Traceback (most recent call last):
File "C:/Users/tmpgcesn/PycharmProjects/TEST/venv/Test/LOGS_Internal.py", line 31, in <module>
services = server1.services.list()
File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\server\_common\_base.py", line 86, in __getattr__
raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, name))
AttributeError: 'Server' object has no attribute 'services'
Process finished with exit code 1
Has anyone resolved this issue?? Or can point to any suggestions?
Regards,
Clive