Debugging the Reporting Requests
What's Happening
Featured
The reporting API is powerful for getting reporting data out of the Adobe Analytics Platform. However it can sometimes be a pain to debug. Let me give you an example of why I mean.
Report.QueueRanked
{
"reportDescription":{
"reportSuiteID":"MyReportSuite",
"dateFrom":"2012-11-01",
"dateTo":"2012-11-15",
"sortBy":"event1",
"elements":[
{
"id":"evar5",
"top":"5",
"startingWith":"1"
}
],
"locale":"string"
},
}
Can you spot the problem? It took me a while to find it as I was putting this post together after a bit of trial and error, I found that I was missing the metric element.
The team has been hard at work implementing better error messages in the requests to make it easier to debug reporting requests. These messages are available either when you retrieve a queued report or by adding the validate parameter as a sibling to the report description like so.
{
"reportDescription":{
"reportSuiteID":"MyReportSuitel",
"dateFrom":"2012-11-01",
"dateTo":"2012-11-15",
"sortBy":"event1",
"elements":[
{
"id":"evar5",
"top":"5",
"startingWith":"1"
}
],
"locale":"string"
},
"validate":"True"
}
Doing this will prevalidate the report so you don't have to check the queued report before getting the error message. The response I get for this particular request is as follows.
{
"status":"error 5023",
"statusMsg":"Invalid metric",
"reportID":0,
"statusDesc":"you must specify at least one metric"
}
Hopefully this saves a little time as you are putting together your reporting requests. We have tried to add meaningful error messages for the most common mistakes. If you find an error that we didn't cover drop us a note, leave a comment of give us a ring and we will see what we can do.