I would like to delete some hosted feature layers from our org but I'm not aware of any way to determine if they are used in any web maps or web apps. Is there any way to generate a list of web maps and/or web apps containing certain layers?
Two (ok, three) options you may want to explore:
If you are into Python, I think the ArcGIS API for Python might allow this:
ArcGIS API for Python | ArcGIS for Developers
I think AGO-Tools from Esri github will get you there as well:
GitHub - Esri/ago-tools: A Python package to assist with administering ArcGIS Online Organizations.
If not, I am pretty sure GeoJOBE (Esri platinum partner) Admin Tools for AGOL can help:
Let me know what ends up working best since this is something I am interested in also.
I would suggest ArcGIS API for Python (like Micah mentioned). It seems that would be the best place to dig into this.
(and I need to seriously get learning this stuff because it's cool!)
Retrieving data ...