Enterprise Sites using the 'sites' property of the 'GIS' object

321
2
01-09-2024 02:04 PM
AbeCoughlin
Occasional Contributor III

Hi folks,

 

This ESRI documentation page states “We can work with Enterprise Sites using the sites property of the GIS object”.

Specifically, I’m trying to create a site using the API – here’s the code from that page.

portal_site = gis_portal.sites.add('Portal Python Site', subdomain='site-in-python-new')

However, I’m getting the error:

AttributeError: 'GIS' object has no attribute 'sites'

I’ve cloned my python environment and updated all modules…, but still no success.

I’m doing this from Pro 10.9.1 to ArcGIS Enterprise 10.9.1.

I’d love to learn why this isn’t working.

Thanks!

HAPPY NEW YEAR!!!

Tags (3)
0 Kudos
2 Replies
Dan_Brumm
Occasional Contributor II

Have you seen this page? Introducing ArcGIS Hub Python API for Sites (esri.com)

Daniel Brumm
GIS Nerd
0 Kudos
AbeCoughlin
Occasional Contributor III
I think in passing, ages ago, but whenever I searched online for documentation etc it never showed up!
Thanks! I'll jump into this later today and advise how it goes!

0 Kudos