Currently, the only way (that I know about) to get list of cases for given filter via XML API is to use:
cmd=setCurrentFilter, with correctsFilterparametercmd=searchwith empty or missingqparameter -- this returns cases in current filter.
Problem is that setCurrentFilter also changes the filter in web UI. To fix this problem, it's better to use:
cmd=listFilters-- to get current filter, i.e. filter withstatus="current"cmd=setCurrentFilteras beforecmd=searchas beforecmd=setCurrentFilterto set back filter from step 1.
There are three problems with this scenario: 1) it takes four requests/replies, 2) there is short period of time when filter is changed and user may see unexpected behaviour in the web UI, 3) if current filter during first step is not one of the saved filters, listFilters will not tell us which filter is current, so we cannot set it back in step 4 :-(
Would it be possible to add a possibility to get list of cases for given filter simply by sending sFilter parameter to cmd=search command? It would not change current filter for user, and would return cases for this filter. This solution would not only be fastest (one request/response only), but would also help to fix unexpected behaviour related to changing global filter.