Null returned for SavedQueryPage

378 views
Skip to first unread message

Padmahas Bn

unread,
Oct 24, 2017, 11:17:15 AM10/24/17
to Google's DoubleClick for Publishers API Forum
Hello,

I'm using 5910 network. I created a report query using DFP UI. But I'm getting null response at
SavedQueryPage page = reportService.getSavedQueriesByStatement(statementBuilder.toStatement());
I queried with this queryID "10037350879".
But when I run the same query in DFP UI, I'm getting a well organized report without any error.
Below is the RequestID and Response. Attached is the detailed SOAP Response.

[ INFO] 32:07(RemoteCallLoggerDelegate.java:logRequestSummary:146)
Request made: Service: ReportService Method: getSavedQueriesByStatement networkCode: 5910 URL: https://ads.google.com/apis/ads/publisher/v201708/ReportService Request ID: c3fa651fb71376adf6e2c54c3b3e4d99 ResponseTime(ms): 134 OperationsCount: null IsFault: false FaultMessage: null

Exception in thread "main" java.lang.NullPointerException
    at java.util.Objects.requireNonNull(Objects.java:203)
    at java.util.Arrays$ArrayList.<init>(Arrays.java:3813)
    at java.util.Arrays.asList(Arrays.java:3800)
    at dfp.axis.v201708.reportservice.RunSavedQuery.runExample(RunSavedQuery.java:75)
    at dfp.axis.v201708.reportservice.RunSavedQuery.main(RunSavedQuery.java:123)

I have crosschecked that this query exists.

Thank you.
ReportSOAPResponse.txt

Nicholas Figeac (DFP API Team)

unread,
Oct 24, 2017, 1:15:39 PM10/24/17
to Google's DoubleClick for Publishers API Forum
Hello,

Did you get the saved query id from the URL when you accessed it on the UI? The URL will look similar to [dfp-url]/[networkcode]/[sessionid]#reports/reporting/qid=10037350879? You will want the qid for saved queries. Also make sure the email id making the API call has access to the saved query. This can be done by adding the email id to "Users able to access" at the bottom of the page when editing the query via API.

Thanks,
Nicholas Figeac, DFP API Team

Padmahas Bn

unread,
Oct 25, 2017, 5:15:09 AM10/25/17
to Google's DoubleClick for Publishers API Forum
Hello Nicholas,

Yes I got the id from the URL when I accessed it on the UI. This is the last part of the URL
"..........#reports/reporting/qid=10037350879"
I ran ReportSevice with this ID "10037350879" itself. Still getting null. The most recent request is,
Request made: Service: ReportService Method: getSavedQueriesByStatement networkCode: 5910 URL: https://ads.google.com/apis/ads/publisher/v201708/ReportService Request ID: 94be3a07ef245ee798016ae301cfcf4e ResponseTime(ms): 244 OperationsCount: null IsFault: false FaultMessage: null

I couldn't find "Users able to access" option in the bottom of the page. I only see "Users able to edit" option.

Thank you.

Nicholas Figeac (DFP API Team)

unread,
Oct 25, 2017, 10:30:57 AM10/25/17
to Google's DoubleClick for Publishers API Forum
Hello,

Yes "User able to edit" is what I meant. Did you add the email id to that field? Can you provide screenshot of the query on the UI with the URL visible? You can use "Reply privately to author". Also, what is the email id sending requests to the network? I can check if it has permissions to access, create, edit reports.

qinn...@gmail.com

unread,
Jul 20, 2018, 4:31:35 AM7/20/18
to Google's DoubleClick for Publishers API Forum
hell,how do you solve the problem?I get the same Exception message.thank you

在 2017年10月24日星期二 UTC+8下午11:17:15,Padmahas Bn写道:

Vincent Racaza (DFP API Team)

unread,
Jul 20, 2018, 6:38:40 AM7/20/18
to Google's DoubleClick for Publishers API Forum
Hi,

You just need to ensure that your saved query is existing and it is indeed created by the API user that you are currently authenticated as.

If your issue still persists after making sure that your saved query is created by your API user, then kindly open a new forum thread with the complete details of your issue so we can better track your specific concern.

Thanks,
Vincent Racaza, DFP API Team

Tobias Zillmann

unread,
Feb 25, 2019, 3:45:51 AM2/25/19
to Google Ad Manager API Forum
Hi Vincent,

I am facing the same problem. Reports are shared with the service account I am using, but "getSavedQueriesByStatement" gives me results=NULL.
Is it even possible to "log in" with a service account and create a saved query in the frontend?

Can you help me with that problem?
network id 183
report id e.g. 11137633886

Thanks,
Tobias

avner.fl...@overwolf.com

unread,
Feb 25, 2019, 6:02:01 AM2/25/19
to Google Ad Manager API Forum
Hey Tobias,

I had the same issue myself and the solution was to add my own email to the UI/"Users able to edit".
Hope it helps

Tobias Zillmann

unread,
Feb 25, 2019, 7:40:12 AM2/25/19
to Google Ad Manager API Forum
Hey Avner,

I am using a Google Service Account to connect to the API. I have the email of that account already added to the "Users able to edit" section.
Still not able to revive a saved query.

Any other ideas? 

Kind regards,
Tobias

admanagerapi...@google.com

unread,
Feb 26, 2019, 1:08:24 AM2/26/19
to google-doubleclick...@googlegroups.com
Hi Tobias,

No, it is not possible to create a saved query using a service account. Can you provide the email address of the user who created the saved query in the UI so I can further investigate? 

Thanks,
Kevin Soriano, Ad Manager API Team
______________________________________________________________________
 An important reminder: v201802 has been deprecated.

 Give us your feedback:
     Feedback Survey

 Also find us on our blog and discussion group:
     http://googleadsdeveloper.blogspot.com/search/label/ad_manager_api
     https://developers.google.com/ad-manager/api/community

--
You received this message because you are subscribed to the Google Groups "Google Ad Manager API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-doubleclick-for-publishers-api+unsubscribe@googlegroups.com.
To post to this group, send email to google-doubleclick-for-publishers-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-doubleclick-for-publishers-api.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages