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 DevicesDetection.getOSVersions using showcolumns adds an extra column #6602

Closed
RMastop opened this issue Nov 5, 2014 · 12 comments
Labels
answered For when a question was asked and we referred to forum or answered it. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@RMastop
Copy link
Contributor

RMastop commented Nov 5, 2014

Hi,

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.

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&hideColumns=metadata_logo

Piwik version:2.8.3

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Dec 1, 2014
@mattab mattab added this to the Short term milestone Dec 1, 2014
@mattab
Copy link
Member

mattab commented Dec 1, 2014

Hi @RMastop thanks for the report.

@RMastop
Copy link
Contributor Author

RMastop commented Feb 5, 2015

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

@mattab mattab modified the milestones: Piwik 2.12.0, Short term Feb 6, 2015
@mattab
Copy link
Member

mattab commented Feb 6, 2015

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

@tsteur
Copy link
Member

tsteur commented Feb 13, 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
Copy link
Contributor Author

RMastop commented Feb 13, 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
Copy link
Contributor Author

RMastop commented Feb 13, 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
Copy link
Member

tsteur commented Feb 14, 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.

@mattab mattab modified the milestones: Piwik 2.12.0, Short term Mar 13, 2015
@mattab mattab modified the milestones: Short term, Mid term Apr 7, 2015
@RMastop
Copy link
Contributor Author

RMastop commented Jan 4, 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.

@RMastop RMastop closed this as completed Jan 4, 2016
@RMastop RMastop reopened this Jan 4, 2016
@RMastop
Copy link
Contributor Author

RMastop commented Jan 11, 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
Copy link
Member

tsteur commented Jan 11, 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

@tsteur tsteur added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. and removed Bug For errors / faults / flaws / inconsistencies etc. labels Jan 11, 2016
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
@mattab mattab removed this from the Long term milestone Dec 5, 2016
@mattab
Copy link
Member

mattab commented Dec 27, 2016

@RMastop this should now work after #11100 - please open new issue if you still experience a problem after 3.0.1-b1 (will be released in few hours)

@mattab mattab closed this as completed Dec 27, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

3 participants