Hi,
According to the documentation here -> Making Reporting API Requests | Adobe Developer Connection , I should be able to add a "format" parameter to the Report.Get method so that I can receive a CSV export.
However I can't get this to work. Is this now deprecated?
Regards,
Vitor Lopes
Solved! Go to Solution.
Views
Replies
Total Likes
When you say "I can't get this to work", can you clarify? For example, do you get a response but it is not csv format? Do you get an error response (e.g. report not ready, or some other thing like missing dateTo or whatever) ? What API version are you using? Did you specify "source":"warehouse" in it? Did you specify a date range.. that has already passed (if you specify a date range that ends in the future, the report won't be pushed to data warehouse queue until the end of the date range!)
In any case, I did a test and it worked for me. Here is an example for what I did, using API v1.4
First, using Report.Queue
{
"reportDescription":{
"reportSuiteID":"myrsidhere",
"dateFrom":"2017-11-01",
"dateTo":"2017-11-30",
"metrics":[
{
"id":"pageViews"
}
],
"elements":[
{
"id":"page",
"top":"5"
}
],
"source":"warehouse"
}
}
Which returns e.g.
{
"reportID":1234567890
}
Then, using Report.Get
{
"reportID":1234567890,
"format":"csv"
}
Note: You will not immediately get data returned. If the report is not ready, the API will respond with an error message stating the report is not ready yet. Data Warehouse report requests generally take longer to be ready than normal report requests, because in addition to the API's queue, Data Warehouse has its own queue based on scheduled DW exports (easiest to check in the DW interface to get an idea about that).
In addition, Data Warehouse will not begin process of completing the report until the ending date in your date range has passed. So for example, you can specify a date range for all of December (this current month) for a normal Report request, and the API will return the data collected so far for the month. But if you attempt to do the same thing for a DW report, DW will not start the process of building the report until January 1st next month!
When you say "I can't get this to work", can you clarify? For example, do you get a response but it is not csv format? Do you get an error response (e.g. report not ready, or some other thing like missing dateTo or whatever) ? What API version are you using? Did you specify "source":"warehouse" in it? Did you specify a date range.. that has already passed (if you specify a date range that ends in the future, the report won't be pushed to data warehouse queue until the end of the date range!)
In any case, I did a test and it worked for me. Here is an example for what I did, using API v1.4
First, using Report.Queue
{
"reportDescription":{
"reportSuiteID":"myrsidhere",
"dateFrom":"2017-11-01",
"dateTo":"2017-11-30",
"metrics":[
{
"id":"pageViews"
}
],
"elements":[
{
"id":"page",
"top":"5"
}
],
"source":"warehouse"
}
}
Which returns e.g.
{
"reportID":1234567890
}
Then, using Report.Get
{
"reportID":1234567890,
"format":"csv"
}
Note: You will not immediately get data returned. If the report is not ready, the API will respond with an error message stating the report is not ready yet. Data Warehouse report requests generally take longer to be ready than normal report requests, because in addition to the API's queue, Data Warehouse has its own queue based on scheduled DW exports (easiest to check in the DW interface to get an idea about that).
In addition, Data Warehouse will not begin process of completing the report until the ending date in your date range has passed. So for example, you can specify a date range for all of December (this current month) for a normal Report request, and the API will return the data collected so far for the month. But if you attempt to do the same thing for a DW report, DW will not start the process of building the report until January 1st next month!
Hi Josh,
Many thanks for you reply, and all the additional info. I was missing the "source":"warehouse" parameter, and I was only getting a response in JSON.
I do however, need to use calculated metrics, which I can't in warehouse. Is there a any to export CSV without using warehouse?
Once again, many thanks.
Regards,
V
Views
Replies
Total Likes
Not that I'm aware of. I made actual efforts to look for something like that about a year ago and could not find one, and I just did a quickish check again and still doesn't look like it
Views
Replies
Total Likes
Views
Like
Replies