Hello,
I've written code below to print a list of Web Maps in my Enterprise Portal.
I'd like to exclude Deprecated Web Maps from the search results. Can I add a parameter to do this?
Thanks in advance.
from arcgis.gis import GIS
from arcgis.mapping import WebMap
import arcpy
gis = GIS("pro")
service_contents = gis.content.search("*",item_type="Web Map", max_items = 1000)
print('Number of Web Maps found: ' + str((len(service_contents))))
#print the service title
for service in service_contents:
print(service.title)
print("Finished")