I’m trying to construct a query dynamically in Python and provide a link to it as part of some output. I’m posting to [url]/api/3.1/queries with body equivalent to
{'model': 'company_investigations', 'view': 'investigations', 'fields': ['a_bunch.of_fields', 'a_table.like_this.one'], 'filters': {'investigations.created_time': '2020-06-01 to 2020-07-01', 'investigations.team': '1234'}, 'query_timezone': 'UTC', 'limit': 500, 'dynamic_fields': [{'dimension': 'a_name_for_it', 'label': 'A Name For It', 'expression': '${investigations.a_number} <= 25', '_kind_hint': 'dimension', '_type_hint': 'yesno'}]}
Getting a 500 “An error has occurred.”
The same thing works if I remove the dynamic_fields kvp.
Does anyone have an example of a body that works while including a custom dimension?
Best answer by izzy
View original