dataapi.service.invalidtimeRange error

This is a followup thread for a query i had raised earlier in the forum.

(Analytics Summary Report for onprem Apigee - Google Cloud Community)

As i did not find a way to get Analytics Summary report email with the Onprem Apigee installation,

I was exploring ways to do it via Analytics API. I was looking at the following stats API(http://docs.apigee.com/analytics-services/content/use-analytics-api-measure-api-program-performance) and changed the time range to a week instead of a month.

No matter how I set the timeRange parameter, i am always getting the error

“dataapi.service.InvalidTimeRange”.

Can someone help me in finding what i am doing wrong here?

curl -v -X GET  "http://<MSIP>:8080/v1/o/<org>/environments/<env>/stats/apis?select=sum(message_count)&timeRange=06/05/2017%2000:00~06/11/2017%2024:00&timeUnit=hour" -u <sysadminid:pwd>

curl -v -X GET  "http://<MSIP>:8080/v1/o/<org>/environments/<env>/stats/apis?select=sum(message_count)&timeRange=06/05/2017%2000:00~06/11/2017%2024:00" -u <sysadminid:pwd>

curl -v -X GET  "http://<MSIP>:8080/v1/o/<org>/environments/<env>/stats/apis?select=sum(message_count)&timeRange=06/05/2017+00:00~06/11/2017+24:00&timeUnit=hour" -u <sysadminid:pwd>

Is this e-mail subscription what you are looking for?

[http://docs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/stats/preferences/reports/dailysummaryreport](http://docs.apigee.com/management/apis/get/organizations/%7Borg_name%7D/stats/preferences/reports/dailysummaryreport)

@Maudrit yes , we are looking for the same report for on-prem Apigee.

Hi @Rajeev S the following community post shouldhelp

https://community.apigee.com/questions/13399/how-do-you-pass-a-time-range-to-a-stats-api.html

also 24:00 as a hour time unit is probably not accepted (because it wraps around to 00:00) Please try 23:59 instead.

You are correct, removed 24:00 and put the time as 23:59 and it worked.

Use

	23:59

instead full hour time →

24:00