Creating DCM report through Explorer API

140 views
Skip to first unread message

Mohammad Asif

unread,
Oct 9, 2019, 1:39:10 AM10/9/19
to Google's DoubleClick Campaign Manager API Forum
Hi Team,

I'm creating report from DCM and below are the steps which I'm following and able to create the report and download it.
  • To create the report,I should be knowing report name and report type in advance and then use the insert method of report service and create the report.
  • Capture the Id from step 1 response and hit the run method of report service.
  • Capture Id and reportId values from step2 reponse and hit the get method of files service. If the status is "REPORT_AVAILABLE" then download by hitting the url.
Based on above approach. I have following queries.
  • Is the right way to create the report and download?
  • I found that if the given files are present in DCM then only I can download the files. otherwise, It seems no way to create the report.
  • What if I want to create the fresh report in DCM and download it from there. Is it possible or is there is a way to download from DCM for particular reportId on the daily basis?
Please help me to understand in a better way.

Thanks,
Asif

DCM API (DoubleClick Campaign Mgr)

unread,
Oct 9, 2019, 1:45:25 PM10/9/19
to sam.a...@gmail.com, google-doubleclick-...@googlegroups.com
Hi Asif,

I am writing my responses inline to maintain clarity: Thanks,
Lakshmi, DCM API Team
 

ref:_00D1U1174p._5001UKMfJL:ref

Mohammad Asif

unread,
Oct 9, 2019, 8:39:33 PM10/9/19
to DCM API (DoubleClick Campaign Mgr), google-doubleclick-...@googlegroups.com
Hi Lakshmi,
Thank you for your timely response. I was able to create the reports through api but only doubt is, should I have report or file available in dcm account first then only I can create the report out of that or Is there's anyway If I want to create the new report from dcm account for particular profileId and reportId for that no report is already available in DCM account?
I just want to confirm you is this the right approach I'm following or is there's any other way to get the data from DCM account?
I just checked that whenever I'm downloading report out of the existing report in DCM, the report is getting created in DCM account as well. Is there's anyway to delete the report after I download the report?

Thanks,
Asif

DCM API (DoubleClick Campaign Mgr)

unread,
Oct 10, 2019, 11:42:35 AM10/10/19
to sam.a...@gmail.com, google-doubleclick-...@googlegroups.com
Hi Asif,

In order to create a report you need the profile id,name,type,dimensions,metrics and daterange. You don't need report id and file id to create a report. Only for downloading the file you need report id and file id. On that note for downloading the file, are you using the API call: https://developers.google.com/doubleclick-advertisers/v3.3/reports/files/get
If so, then it will not create a new report from an existing report. You can delete the report using Reports.delete call: https://developers.google.com/doubleclick-advertisers/v3.3/reports/delete
Did you get a chance to go through the Reporting guide -  https://developers.google.com/doubleclick-advertisers/guides/create_reports

Please send more details by using Reply privately to author option if you still see this behavior - I just checked that whenever I'm downloading report out of the existing report in DCM, the report is getting created in DCM account as well. 

Mohammad Asif

unread,
Oct 10, 2019, 1:42:20 PM10/10/19
to Google's DoubleClick Campaign Manager API Forum
Hi Lakshmi,

I'm using file get method to download the report. My question is that this is the way how we get the campaign manager account related data or is there's any other way to get the date for metrics and dimensions. I'm not able to connect the dot. By creating the file from dcm it seems we should have report already in dcm and then only we can get the data for particular date range,other metrics and dimensions from that report. so how those reports generated first in dcm. Is user is creating the report?

In your response "In order to create a report you need the profile id,name,type,dimensions,metrics and daterange." you have mentioned "name". This is the name of the file which is already present in dcm right?

Mohammad Asif

unread,
Oct 10, 2019, 2:08:31 PM10/10/19
to Google's DoubleClick Campaign Manager API Forum
This is how my requirement is, I have to pull brand,campaignchannel,site publisher etc dimensions and Impressions,clicks and click-through Rate etc metrics. What I understand till now that we have the report in dcm account use method mentioned in above conversation and pull out the data. Let me know If my understanding is correct or is there any other way to get these dimensions and metrics?

Thanks,
Asif

DCM API (DoubleClick Campaign Mgr)

unread,
Oct 10, 2019, 4:16:43 PM10/10/19
to sam.a...@gmail.com, google-doubleclick-...@googlegroups.com
Hi Asif,

Using Reporting service you can get the dimensions and metrics data.There is no alternative solution to get the metrics data via DCM API. A report can be created by anyone who has access and permission to create the report either via the UI and the API. If you have permission to create the report, then you can create it. Based on your permissions either you can modify or view the report created by others. The name I mentioned in my response is the name of the report that will be created in the DCM. Please check the API reference document: https://developers.google.com/doubleclick-advertisers/v3.3/reports/insert

If your business usecase is to pull the existing reports by giving the report id and file id then you can use files.get call (https://developers.google.com/doubleclick-advertisers/v3.3/reports/files/get). If your business use case is to generate a report, then you need to create, run and download the report.
Message has been deleted

DCM API (DoubleClick Campaign Mgr)

unread,
Oct 11, 2019, 2:37:24 PM10/11/19
to sam.a...@gmail.com, google-doubleclick-...@googlegroups.com
Hi,

I am able to reproduce this issue in the UI and API as well. There shouldn't be any spaces in the filename. For example, samplereport but not 'sample report'. To conclude, this restriction is not specific to API but at DCM product level.
Message has been deleted
Message has been deleted

Mohammad Asif

unread,
Oct 14, 2019, 2:06:32 AM10/14/19
to Google's DoubleClick Campaign Manager API Forum
Thank You Lakshmi, I'm able to create the report now. Only thing is I have passed certain metrices and dimensions but is there's a way to check and download metrices and dimensions for particular social media sites. For example what if I want to get the metrices and dimensions for Facebook,twitter, Snapchat etc. Is this possible?
             My Second question is I'm looking for DCM Brand,Channel, Device Type dimensions and Click-Through Rate metric in DCM , but I'm not able to find them in dimensions                 and  metrics list. Is there a way to get them?
My Third question would be I don't want to schedule the report on the daily basis. I will schedule my python program daily and that will download the previous day data. for example let say we have 14 October today.so my report input will contain 12-13 October as a start and end date and will download the data for this one day. Let me know what you think on this.

Thanks,
Asif

DCM API (DoubleClick Campaign Mgr)

unread,
Oct 14, 2019, 2:58:08 PM10/14/19
to sam.a...@gmail.com, google-doubleclick-...@googlegroups.com
Hi Asif,

We do have social and twitter related metrics via API:https://developers.google.com/doubleclick-advertisers/v3.3/dimensions
For media site, brand, device type and Click-Through Rate, I would recommend checking with the general support team (if they are available at product level) and create the report in the UI. You can retrieve the UI saved report via API using Reports.get call. This way you will get an idea on available and possible allowed combinations for your usecase via API. If any of the metrics that you are looking for are available at the product level, but not via API, then you can schedule the UI report.

Helpful links:
  1. General support team:  https://support.google.com/dcm/answer/9026876?visit_id=637045160110215539-446006384&rd=1
  2. Reports.get call: https://developers.google.com/doubleclick-advertisers/v3.3/reports/get
In DCM API, either you can schedule the report or create a daily report. Whichever is best for your usecase, you can go with it. In the future, please start a new thread for a new question.
Reply all
Reply to author
Forward
0 new messages