Reporting API and XML bulk request result


#1

I’ve tried to use the reporting API with API.getBulkRequest nesting 2 different simple requests and format XML. The XML response contains a row element for each of these nested results. But because there is no quantifier on the row element, its not easy or maybe impossible to unmarshall/map it to the according result objects (with Java JAXB or Jackson for example).

<result>
  <row>
    <!-- Response 1 -->
  </row>
  <row>
    <!-- Response 2 -->
  </row>
</result>

Any idea to solve this problem? Or will the Matomo developers maybe add an attribute to those row elements in the next release?

Thanks in advance, Titus


#2

Question too difficult or stupid?

Here is my example with JSON:

[
  {
    <!-- Response for method VisitsSummary.get -->
  },
  [
    <!-- Response for method VisitorInterest.getNumberOfVisitsPerVisitDuration -->
  ]
]

The problem here is to deserialize an array with mixed content (object and another array). :confused:

Titus