@RMastop opened this issue on November 5th 2014


API reporting features adds an extra column to the export, like the following: http://demo.piwik.org/index.php?module=API&method=DevicesDetection.getOsVersions&format=TSV&idSite=7&period=day&date=yesterday&expanded=0&translateColumnNames=0&showColumns=label,nb_visits

What I expected was an export with 2 columns, named "label" and "nb_visits".

What I got was an export with 3 columns; "label", "nb_visits" and an extra, but unwanted "metadata_logo"

When adding the option hideColums for the unwanted column, the result stays the same.


Piwik version:2.8.3

@mattab commented on December 1st 2014

Hi @RMastop thanks for the report.

@RMastop commented on February 5th 2015

Anyone working on this? do you need some more input on the bug?

@mattab commented on February 6th 2015

Hi @RMastop I'm moving this bug in next milestone so we take a look at it

@tsteur commented on February 13th 2015

I didn't have a look yet but I think we recently talked about showColumns/hideColumns not filtering metadata which would be kinda a bug. Just in case someone will work on this and applies the filtering to metadata as well be aware that this would be a breaking change and would most likely break all Piwik Mobile versions.

@RMastop commented on February 13th 2015

I sometimes need to use both showColumns AND hideColums to ge the correct result. For instance when requesting page url data in a flat format, where I only need nb_hits and url. I need to showColumns for nb_hits and url. But because I use flat=1 I get all subcolumns as well. I then use hideColumns to hide those unwanted culomns, like action name etc.

I expected the result to contain only the requested columns.

@RMastop commented on February 13th 2015

In the initial bug report, I used the parameter hideColumns=metadata_logo I guess I should use hideColumns=logo because metadata_ is added to the column label in the result.

@tsteur commented on February 14th 2015

Neither logo nor metadata_logo will work from what I have seen so far. This will get worse with the next release as there will be another metadata entry (column) named segment. Problem will be to fix it without breaking the API. We might need to introduce API versions at some point.

@RMastop commented on January 4th 2016

Just tried in demo.piwik.org, hideColumns in live API is failing. Is this someting that might be solved in near future release? I only need some columns, but either showColumns or hideColumns does not seem to work. So now I need to download all data and than throw away unneeded data.

@tsteur commented on January 10th 2016

I just tried http://demo.piwik.org/index.php?module=API&method=Live.getLastVisitsDetails&idSite=7&period=day&date=yesterday&expanded=0&translateColumnNames=0&hideColumns=idVisit,visitorId&format=xml and it seems to work. Which API are you using?

@RMastop commented on January 11th 2016

Hi @tsteur one of them would be: https://demo.piwik.org/index.php?module=API&method=Live.getLastVisitsDetails&idSite=7&period=day&date=yesterday&expanded=0&translateColumnNames=0&format=xml&showColumns=url,pageTitle

Where I would like to retrieve the arrays of only the URL and pageTitle of every actionDetails row. The result I get is a list of empty row values.

@tsteur commented on January 11th 2016

This doesn't work by design since showColumns currently only works on first level properties like actionDetails, idVisit, ... it doesn't apply it to "nested elements". This is a new feature would possibly require a new API parameter

@mattab commented on December 27th 2016

@RMastop this should now work after https://github.com/piwik/piwik/pull/11100 - please open new issue if you still experience a problem after 3.0.1-b1 (will be released in few hours)

This issue was closed on December 27th 2016
Powered by GitHub Issue Mirror