Structuring GET request to REST Discovery Document using FieldMask as a query parameter

42 views
Skip to first unread message

Charles Kemp

unread,
Sep 16, 2020, 2:49:56 PM9/16/20
to AdWords API and Google Ads API Forum
Trying to figure out how to properly structure an HTTP GET request to the Google Ads API REST discovery document, specifically so that the response only contains fields specified using the FieldMask query parameter.

When sending a request formatted like this: https://googleads.googleapis.com/$discovery/rest?version=v5?&fields=schemas it returns an error. 

Have tried with a variety of fields contained within the Discovery document with no success. 

Could use assistance in properly formatting the HTTP request such that I can control what data is returned.

Thanks for any help!


mMuhammad mShahzad

unread,
Sep 16, 2020, 2:52:53 PM9/16/20
to cha...@imspartacus.org, AdWords API and Google Ads API Forum
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/26351b21-3af8-41fc-9359-e559b441c9d1n%40googlegroups.com.

Google Ads API Forum Advisor Prod

unread,
Oct 26, 2020, 9:02:57 AM10/26/20
to cha...@imspartacus.org, adwor...@googlegroups.com
Hi Charles,

I think the issue is that the discovery endpoint may not be considered to be a core part of the API, and so those query parameters don't apply to it. The field mask filter would be used on a request for Ads data from the API, the discovery endpoint just contains metadata about the available fields. If you just want to isolate the "schemas" object, my recommendation would be to parse the JSON that's returned. If it's helpful, we have documentation on how to access the Google Ads API using REST here.

Hope that helps, let me know if you have any other questions.

Best,
Ben, Google Ads API Team

ref:_00D1U1174p._5004Q24bv3D:ref
Reply all
Reply to author
Forward
0 new messages