|
POST
|
1. Does this occur on every web map?
2. What version of the api are you running?
... View more
11-26-2024
01:08 PM
|
0
|
1
|
3899
|
|
POST
|
@OrvilleMcLean I was able to get the below to work:
import arcpy
from arcgis.gis import GIS
from arcgis.map import Map
# Variables
username = 'jskinner_rats'
password = '*********'
webMapID = '50223959653f40b8bb097bd0fda7994a'
outputGDB = r'C:\temp\python\test.gdb'
# Environment Variables
arcpy.env.overwriteOutput = True
# Connect to AGOL
gis = GIS('https://www.arcgis.com', username, password)
arcpy.SignInToPortal('https://www.arcgis.com', username, password)
wmItem = gis.content.get(webMapID)
webmap = Map(wmItem)
layers = webmap.content.layers
tables = webmap.content.tables
# Export Feature Services/Tables
if len(layers) > 0:
for layer in layers:
print(f"Exporting {layer}")
arcpy.ExportFeatures_conversion(layer.url, outputGDB + '\\' + layer.url.split('/')[-3])
if len(tables) > 0:
for table in tables:
print(f"Exporting {table}")
arcpy.ExportTable_conversion(table.url, outputGDB + '\\' + table.url.split('/')[-3])
... View more
11-26-2024
11:30 AM
|
0
|
2
|
3902
|
|
POST
|
@DavidColey try changing the group name to the group ID:
org_group = ["Planning Layers Group"]
Ex:
org_group = ['80d1821b9af64b9b9fd81dc0d4c8d991']
... View more
11-26-2024
09:25 AM
|
0
|
0
|
2217
|
|
POST
|
Hi @OrvilleMcLean,
I've used the Web Map's JSON before to get the layers/tables. Below is a snippet your could use to download feature services/hosted tables from a web map.
import arcpy
from arcgis.gis import GIS
# Variables
username = 'jskinner_rats'
password = '********'
webMapID = '50223959653f40b8bb097bd0fda7994a'
outputGDB = r'C:\temp\python\test.gdb'
# Environment Variables
arcpy.env.overwriteOutput = True
# Connect to AGOL
gis = GIS('https://www.arcgis.com', username, password)
arcpy.SignInToPortal('https://www.arcgis.com', username, password)
# Get feature service and table URLs
operationalLayers = []
operationalTables = []
webMap = gis.content.get(webMapID)
webMapJSON = webMap.get_data(try_json=True)
try:
for layer in webMapJSON['operationalLayers']:
if layer['layerType'] == 'GroupLayer':
for groupLyr in layer['layers']:
operationalLayers.append(groupLyr['url'])
else:
operationalLayers.append(layer['url'])
for table in webMapJSON['tables']:
operationalTables.append(table['url'])
except KeyError:
pass
# Export Feature Services/Tables
if len(operationalLayers) > 0:
for layer in operationalLayers:
print(f"Exporting {layer}")
arcpy.ExportFeatures_conversion(layer, outputGDB + '\\' + layer.split('/')[-3])
if len(operationalTables) > 0:
for table in operationalTables:
print(f"Exporting {table}")
arcpy.ExportTable_conversion(table, outputGDB + '\\' + table.split('/')[-3])
... View more
11-26-2024
09:19 AM
|
0
|
4
|
3920
|
|
POST
|
Are you able to export the feature service to a File Geodatabase using the item details page?
... View more
11-26-2024
05:32 AM
|
0
|
1
|
1401
|
|
POST
|
Hi @CanDAGDELEN1, give the Copy Hosted Feature Services tool in this toolset a shot.
... View more
11-26-2024
04:38 AM
|
0
|
1
|
1428
|
|
POST
|
Hi @DJB,
Try the following:
from arcgis.gis import server
# Stand-alone ArcGIS Server instance specify Primary Site Admin (i.e. siteadmin)
# Federated ArcGIS Server instance specify Portal Admin (i.e. portaladmin)
agsServer= server.Server(url="https://ags.esri.com/server", username='portaladmin', password='*******')
# Stop services
serviceList = []
folderList = [folder for folder in agsServer.content.folders if folder != 'Hosted'
and folder != 'System' and folder != 'Utilities']
folderList.append('')
for folder in folderList:
for service in agsServer.services.list(folder):
service.stop()
... View more
11-25-2024
01:05 PM
|
2
|
1
|
2135
|
|
POST
|
Hi @myESRIUName take a look at the Copy Web Maps tool that's included with these tools. The script will give you the logic to copy the web map, and also how to update the URLs.
... View more
11-25-2024
05:37 AM
|
0
|
1
|
3165
|
|
POST
|
@CW-GIS you can use the Append tool and perform an upsert by specifying match fields.
... View more
11-25-2024
03:57 AM
|
2
|
0
|
2002
|
|
POST
|
Hi @KendallJames73,
Hosted feature layer views could be an option, but if it's not feasible to have hosted feature services, you could create a spatial view if the data is stored in an Enterprise Geodatabase.
... View more
11-22-2024
06:03 AM
|
0
|
1
|
1205
|
|
POST
|
I would recommend using a local server that has ArcGIS Pro to execute your scripts. You can then leverage the smtplib module and send e-mails/texts.
... View more
11-21-2024
10:48 AM
|
0
|
1
|
1444
|
|
DOC
|
@DJB I think this is a False warning. The Folder.add() method the message references should be used for adding a new Folder, not an item. This can be safely ignored.
... View more
11-21-2024
10:46 AM
|
0
|
0
|
16851
|
|
POST
|
Unfortunately, you won't be able to send an e-mail using smtplib in AGOL Notebooks.
... View more
11-21-2024
07:42 AM
|
0
|
0
|
1471
|
|
POST
|
Hi @PanGIS, are you also sharing the Map Image Layer to the Org and Groups?
... View more
11-20-2024
05:17 AM
|
0
|
0
|
1226
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM | |
| 1 | 01-20-2026 04:04 AM |
| Online Status |
Online
|
| Date Last Visited |
14 hours ago
|