Hi there,
Please post your question in the following community: https://adobe.ly/3NI8n1q
Experts here will be able to assist you better. Thanks
^BS
-----------------------------question------------------
Hi,
I am trying to figure out if there would there be a way to specify (say) last 24h in the dateRange for an Adobe Analytics API call, instead of concrete dates such as:"2024-10-13T00:00:00.000/2024-10-14T00:00:00.000" in the following JSON below {
"type": "dateRange",
"dateRange": "2024-10-13T00:00:00.000/2024-10-14T00:00:00.000",
"dateRangeId": "thisMonth"
}
Does anybody know if that is posible and the syntax of a sample JSON. I am sucessfully
calling this: https://appservice-reporting5-1.omniture.com/reporting/1.0/analytics/users/reports/ranked?locale=en_... with the JSON:
Views
Replies
Total Likes
I don't think there we have preset the last 24 hours in Analytics. The only is to use a static date range or build a rolling last 24-hour custom date range and use the same in API.
Views
Replies
Total Likes
Yes, sadly there is no pre-defined ranges at those granularities.
Views
Replies
Total Likes
How are you running your API Calls?
If you parameterize the Date Fields in your cron or DB job, etc, you should be able to pass the expected "last 24 hours" or "last hour" (though this one I would be careful with as post processing likely hasn't finished yet... even the last 24 hours, I would be tempted to use a 24 hour period, but offset by an hour to ensure post processing)
However, in your Date Range:
"dateRange": "2024-10-13T00:00:00.000/2024-10-14T00:00:00.000",
if parameterized, you should be able to pass something like:
"dateRange": "2024-10-27T11:00:00.000/2024-10-28T12:00:00.000"
Views
Replies
Total Likes
I accidentally gave you 25 hours, but you should get the idea.
While the Swagger side doesn't let you access that directly, I can see it in my debug mode in Workspace when I adjust the time in my date range:
Views
Likes
Replies