Skip to main content
Participant
October 27, 2024
Answered

Adobe Anaytics API Date Range last 1h, last 24h, etc

  • October 27, 2024
  • 1 reply
  • 194 views

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_US&includeOberonXml=true&useResultsCache=true with the JSON:

{
"rsid": "schopreprodmain",
"globalFilters": [
{
"type": "dateRange",
"dateRange": "2024-10-13T00:00:00.000/2024-10-14T00:00:00.000",
"dateRangeId": "thisMonth"
}
],
"metricContainer": {
"metrics": [
{
"columnId": "metrics/visits:::0",
"id": "metrics/visits",
"filters": [
"STATIC_ROW_COMPONENT_1"
]
},
{
"columnId": "metrics/visitors:::2",
"id": "metrics/visitors",
"filters": [
"STATIC_ROW_COMPONENT_3"
]
},
{
"columnId": "metrics/visits:::4",
"id": "metrics/visits",
"filters": [
"STATIC_ROW_COMPONENT_5"
]
},
{
"columnId": "metrics/visitors:::6",
"id": "metrics/visitors",
"filters": [
"STATIC_ROW_COMPONENT_7"
]
}
],
"metricFilters": [
{
"id": "STATIC_ROW_COMPONENT_1",
"type": "segment",
"segmentId": "xxxx"
},
{
"id": "STATIC_ROW_COMPONENT_3",
"type": "segment",
"segmentId": "xxxx"
},
{
"id": "STATIC_ROW_COMPONENT_5",
"type": "segment",
"segmentId": "xxxx"
},
{
"id": "STATIC_ROW_COMPONENT_7",
"type": "segment",
"segmentId": "xxxx"
}
]
},
"settings": {
"countRepeatInstances": true,
"includeAnnotations": true
},
"statistics": {
"functions": [
"col-max",
"col-min"
]
},
"capacityMetadata": {
"associations": [
{
"name": "applicationName",
"value": "Analysis Workspace UI"
}
]
}
}
This topic has been closed for replies.
Correct answer Bani Verma

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

1 reply

Bani Verma
Bani VermaCorrect answer
Legend
October 28, 2024

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