@mrjoops opened this Issue on May 22nd 2015

I try to search my huge user base (40000+ entries) using the reporting API with the following parameters:

  • filter_column: login
  • filter_limit: 20
  • filter_pattern: ^publ
  • module: API
  • method: UsersManager.getUsers
  • token_auth: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

but I always get all my users as a result.

The response indeed contains the login column. Actually, it contains these columns:

  • alias
  • _dateregistered
  • email
  • login
  • password
  • _superuseraccess
  • _tokenauth

I tried other columns and patterns without success, filter_column and filter_pattern seem to have no effect.
By the way, filter_limit works as expected.

As a matter of fact, there is no way to search for a user. I really miss a method mirroring SitesManager.getPatternMatchSites for users.

@tsteur commented on May 24th 2015 Member

That's a bug indeed. Those filters to currently not work for API's that return an array. filter_column and filter_pattern should work with the latest Piwik version though I think. Are you using the latest version (Piwik 2.13.1)?

@mrjoops commented on May 25th 2015

I use Piwik 2.13.1.

@tsteur commented on May 25th 2015 Member

I just had a look. It works if you use filter_column[]=^publ. This is a bug as I expected our internal logic here https://github.com/piwik/piwik/blob/2.14.0-b1/core/API/ResponseBuilder.php#L193 would actually convert filter_column=^publ to an array of ['^publ'].

If you need that feature now I recommend to use this workaround until it is fixed.

@tsteur commented on May 25th 2015 Member

@mattab I'm not sure re milestone.

It would be nice to make all those filter parameters work on all numeric indexed array returns for Piwik 3.0 but it's most likely not realistic.

@mattab commented on May 25th 2015 Member

@tsteur I think 3.0.0 is already over-committed so we can't do it for this version I'm afraid. But +1 for working on this in 3.x

Powered by GitHub Issue Mirror