Select to view content in your preferred language

AGOL and/or Portal API to list maps that have certain feature services/layer

389
2
Jump to solution
04-25-2023 09:30 AM
MaryAnne_VanZuyle
Occasional Contributor

Our GIS team has expanded without having a good content management plan in place. We have several services published that may not be used in any maps. We work in both the AGOL and Portal environments.

I would like to know if there is any API call that will list the maps that a particular feature service or layer is used in. Time for some serious clean up, but we would like to automate it as much as possible.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
DavidPike
MVP Frequent Contributor

A good starter here - https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html

https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-list-which-feature-layers-are-b...

Personally I'd create a set of all features found, then create a dictionary of features (key) to webmaps (value [list]) 

will involve some tweaking if you have sublayers etc.

View solution in original post

2 Replies
DavidPike
MVP Frequent Contributor

A good starter here - https://developers.arcgis.com/python/api-reference/arcgis.mapping.toc.html

https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-list-which-feature-layers-are-b...

Personally I'd create a set of all features found, then create a dictionary of features (key) to webmaps (value [list]) 

will involve some tweaking if you have sublayers etc.

MaryAnne_VanZuyle
Occasional Contributor

Yesterday I looked all over for the developers page you referenced and couldn't find it. Thank you! And apparently I also need to be subscribing to an additional community group. 

 

I will do some testing, but I am going to mark this problem as solved.

0 Kudos