How can I get a List of ALL TAGS in my Organization?

328
2
Jump to solution
03-12-2019 01:00 PM
Highlighted
New Contributor II

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

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor III

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)

View solution in original post

2 Replies
Highlighted
New Contributor III

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)

View solution in original post

Highlighted
New Contributor II

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

Reply
0 Kudos