Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

marc_blecher
Level 2
Level 2

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

1 Accepted Solution
ParitMittal
Correct answer by
Level 10
Level 10

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

View solution in original post

9 Replies
marc_blecher
Level 2
Level 2

Does anybody have an idea about this issue?

marc_blecher
Level 2
Level 2

Is this feature not supported currently?

ParitMittal
Level 10
Level 10

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 

ParitMittal
Correct answer by
Level 10
Level 10

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

View solution in original post

marc_blecher
Level 2
Level 2

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

marc_blecher
Level 2
Level 2

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

ParitMittal
Level 10
Level 10

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

trishas77569438
Level 1
Level 1

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