Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting API: apply hideColumns recursively to nested values by setting hideColumnsRecursively=1 #11115

Merged
merged 5 commits into from Aug 18, 2020

Conversation

mattab
Copy link
Member

@mattab mattab commented Dec 30, 2016

No description provided.

@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Dec 30, 2016
@mattab mattab added this to the 4.0.0 milestone Dec 30, 2016
@tsteur tsteur changed the base branch from 3.x-dev to 4.x-dev January 14, 2020 03:56
@mattab mattab added the Needs Review PRs that need a code review label Jan 31, 2020
@sgiehl sgiehl force-pushed the recursive_columns_api branch 2 times, most recently from 6f0d24b to 4203fce Compare February 4, 2020 08:51
@tsteur
Copy link
Member

tsteur commented Feb 4, 2020

That be actually a very big (breaking) change. Are we sure we'd want to do this and are we clear on all that it means for all the different API calls? I'm not sure I'd want this merged actually and rather close it I would say.

@sgiehl
Copy link
Member

sgiehl commented Feb 19, 2020

@tsteur what about having an additional option for those filters to filter recursively? could maybe also be exposed as api parameter or something like that?

@tsteur
Copy link
Member

tsteur commented Feb 19, 2020

@sgiehl that could work. Although generally not seeing that feature request very often and then we need to add test cases and support it etc. Generally that would work though 👍

@sgiehl
Copy link
Member

sgiehl commented Feb 19, 2020

maybe @mattab can say something about the intention of that PR? Not sure what it would be needed for 🤔

@mattab
Copy link
Member Author

mattab commented Feb 25, 2020

The goal of the PR was to be able to filter columns in the output of the Live APIs, where currently showColumns/hideColumns aren't applied, and all data is always returned for all visitors. it was requested a few times over the years to be able to remove/show only some columns in these Live API outputs, as they are wordy/large by default.

@tsteur
Copy link
Member

tsteur commented Feb 25, 2020

If it's easy to do we can introduce one additional general API parameter to enable this behaviour but we would not want this by default.

@mattab
Copy link
Member Author

mattab commented May 5, 2020

Another idea: could we otherwise only offer this specific behavior (by default) to Live APIs only? because it's only useful for Live APIs afaik so not really needed to add this feature to our API as a whole maybe...

@sgiehl
Copy link
Member

sgiehl commented Aug 17, 2020

@mattab @tsteur I've updated the PR. Now there is an additional parameter hideColumnsRecursively, which can be set to 1 to enable the removal of nested columns. For Live API methods that parameter defaults to 1. All others will assume 0.

Note: for showColumns that might not work as expected.

@tsteur
Copy link
Member

tsteur commented Aug 17, 2020

@sgiehl can you add one system test for the Live API?

@sgiehl
Copy link
Member

sgiehl commented Aug 18, 2020

added a test

@tsteur tsteur merged commit 0cc2797 into 4.x-dev Aug 18, 2020
@tsteur tsteur deleted the recursive_columns_api branch August 18, 2020 21:00
@mattab mattab changed the title Reporting API: showColumns and hideColumns are now applied recursively Reporting API: apply hideColumns recursively to nested values by setting hideColumnsRecursively=1 Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants