We want to clean out unwanted TAGS from our ArcGIS Online Organization.
Can I use the Python API or something else to do this?
Thank you,
Aaron
Solved! Go to Solution.
Hello Aaron,
You can search by your organization id, then loop though all the items and print out the tags. Below is an example....
import arcgis
from arcgis.gis import GIS
gis = GIS()
search_result = gis.content.search(query="orgid: Your org id here", max_items = 100)
for item in search_result:
print(item.tags)
Hello Aaron,
You can search by your organization id, then loop though all the items and print out the tags. Below is an example....
import arcgis
from arcgis.gis import GIS
gis = GIS()
search_result = gis.content.search(query="orgid: Your org id here", max_items = 100)
for item in search_result:
print(item.tags)
Hi Munachiso,
Thank you for the easy to follow code snippet.
I am now trying to use the same code for Portal.
Should it work in portal and why doesn't it need credentials to get the tags?
Thank you again,
Aaron
this string is not working for me. does anyone have an update?
There is one way to get a list of all the Tags in your Org. If you generate an Item Report, one of the columns in the outputted CSV file is 'Tags'. It will take a lot of hand-jamming an cleaning but you will have your list of all your tags.