Can't finde the format of the reportInterval option for the Target API

Avatar

Avatar

marc_blecher

Avatar

marc_blecher

marc_blecher

25-10-2016

Hi!

Since the AB activity performance report is restricted to 100 days for daily resolution I have to split my API calls up in several intervals and merge the result manually afterwards.

But the input format of the option reportInterval is not documented (or respectively I haven't found it yet). 😞

The API usually delivers time intervals as a string in the following format: 1477036800000-1477386000000

But if I provide this format for the reportInterval the API call fails with the following error message:

{"httpStatus":400,"requestId":"pVrZB7VcKx0Q9Vllz6KHrN9V2ty3rhy7","requestTime":"2016-10-25T08:54:30.852Z", "errors":[{"errorCode":"typeMismatch.activityPerformanceReportParameters.reportInterval","message":"wrong parameter value [1477036800000-1477386000000] for parameter [reportInterval];","meta":{"reportInterval":"1477036800000-1477386000000"}}]}

What is the correct intervall format for this call?

Regards
Marc

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

ParitMittal

Avatar

ParitMittal

ParitMittal

02-11-2016

Hi Marc,

All the date parameters in our APIs are in the ISO-8601 format. Hence the the Report Interval should be in ISO-8601 format. For more information of ISO-8601 formation please see the following link :https://en.wikipedia.org/wiki/ISO_8601https://en.wikipedia.org/wiki/ISO_8601#Time_intervals

Please try that and if you still can't execute a successful call, please provide the exact call you are making.

Also, We will update the documentation to include the format for parameters

Thanks & Regards

Parit Mittal

Answers (8)

Answers (8)

Avatar

Avatar

trishas77569438

Avatar

trishas77569438

trishas77569438

15-01-2018

Hi Team,

Is there a way to generate day wise Performance report  for specified date range?

For ex: Date Range: 01-05 to 04-05

Report ex:

Day     experience  PageViews  Orders

01-05        a                xxxx            xxxx

01-05        b                xxxx            xxxx

02-05        a                xxxx            xxxx

    to       

04-05        b               xxxx             xxxx

Avatar

Avatar

ParitMittal

Avatar

ParitMittal

ParitMittal

03-11-2016

Hi Marc,

Thanks for letting us know. I will forward the issue with the engineering team so that they can provide more insights on this.

Thanks & Regards

Parit Mittal

Avatar

Avatar

marc_blecher

Avatar

marc_blecher

marc_blecher

03-11-2016

Another issue regarding this:

If you provide the date for a daily report as follows 2016-11-01T00:00:00.000Z/2016-11-01T23:59:59.999Z, the API will return two full days (from 10/31/2016 to 11/1/2016) instead of the requested time period.

You can work around by providing the interval as follows 2016-11-01/2016-11-02. This will return in fact only one day (11/1/2016).

Regards
Marc

Avatar

Avatar

marc_blecher

Avatar

marc_blecher

marc_blecher

03-11-2016

Thank you Parit!

It's a good Idea to update the documentation since the API requires an interval in iso-8601 but returns it as unixtime like this:

"reportInterval" : "1476367200000-1476720000000"

Regards
Marc

Avatar

Avatar

ParitMittal

Avatar

ParitMittal

ParitMittal

02-11-2016

Hi Marc, 

I have reached out to the Engineering team for this query. Once they provide a solution I will get back to you ASAP.

Thanks & Regards

Parit Mittal 

Avatar

Avatar

marc_blecher

Avatar

marc_blecher

marc_blecher

01-11-2016

I really need help with this issue!

Avatar

Avatar

marc_blecher

Avatar

marc_blecher

marc_blecher

31-10-2016

Is this feature not supported currently?

Avatar

Avatar

marc_blecher

Avatar

marc_blecher

marc_blecher

28-10-2016

Does anybody have an idea about this issue?