I'm attempting to query all of my organization's AGOL content that is a dashboard and within a single group (based on the group ID).
Here is a snippet from my code:
import arcgis
gis = arcgis.gis.GIS("https://www.arcgis.com", "username", "password")
dashboardItems = gis.content.search(query="id:groupID", item_type="Dashboard", max_items=9999)
I end up returning no items in the query even though there are multiple dashboards in my group content. I'm wondering if the issue has to do with the fact that both item and group IDs can be queried using the id field and maybe the query is trying to find a matching item ID (instead of group ID)?
Solved! Go to Solution.
It looks like based on the Search reference—ArcGIS REST APIs | ArcGIS Developers the format is
query = "group:groupID"
It is mentioned in the "Item Fields" table about halfway down that reference page.
It looks like based on the Search reference—ArcGIS REST APIs | ArcGIS Developers the format is
query = "group:groupID"
It is mentioned in the "Item Fields" table about halfway down that reference page.