AnsweredAssumed Answered

How to add a filter to an ArcGIS Online item using the Python API?

Question asked by gmcnamee_usfs on Dec 5, 2017
Latest reply on Aug 19, 2019 by mpiraesriaustralia-com-au-esridist

I'm trying to add a filtered view of an ArcServer map service (or feature service, if necessary) to ArcGIS Online by REST service URL using the API for Python. I can create the item in ArcGIS online using the url, but how do I add a filter? When I do this manually, I add the item to my content, go to the item details page, got the Visualization tab, click filter, add the filter, and save. Can this be done programmatically, using the Python API? Any help would be appreciated. 


Edit: Perhaps layer definition or definition expression are better terms than filter.