How to get a simple translated report from the REST API

Hi all,

I’d like to display a simple Referrers.getReferrerType report view on a page.

By view I mean that I do not want an interactive widget (so using Widgetize is out of the question) but just a html table with translated labels.

By calling a direct API.get with the parameters


?module=API&method=API.get&apiModule=Referrers&apiAction=getReferrerType&idSite=1&period=day&date=today&format=html

I get back a table (which by the way does not contain the segment value – which should be “direct visitors” in my case – with the metrics IDs as column heads; ie. nb_uniq_visitors, nb_visits, nb_users…)

if I call thuis Url instead:


?module=Referrers&action=getReferrerType&widget=0&idSite=1&period=day&date=today&language=fr

I get back a pretty html doc but with all html documentation and widget controls.

Is there a way and with which parameters to get only the data table with french contents but without all the documentation and icons ?

Thanks in advance.
Max.

Salut Max,

Yes it’s possible. See the new parameter:


&translateColumnNames=1&language=fr

Example URL; http://demo.piwik.org/?module=API&method=API.get&apiModule=Referrers&apiAction=getReferrerType&idSite=3&period=day&date=today&format=html&translateColumnNames=1&language=fr