List of campaign attributes.

184 views
Skip to first unread message

Joe Stedman

unread,
Mar 12, 2019, 10:00:30 AM3/12/19
to AdWords API and Google Ads API Forum
Hi, I'm trying to get a list of attributes+metrics for the campaign artifact along with their enum values if applicable.
I managed to get the metrics using the GoogleAdsFieldService with this as the query:
"SELECT name, category, selectable, enum_values, filterable, sortable, selectable_with, data_type, is_repeated WHERE category IN ('METRIC','ATTRIBUTE') AND selectable_with CONTAINS ALL ('campaign')"

This only returns the metrics, which i understand. What should I do to get the attributes?

Thanks,
Joe

Joe Stedman

unread,
Mar 12, 2019, 11:34:33 AM3/12/19
to AdWords API and Google Ads API Forum
You know what, i figured it out.
$"SELECT name,selectable,enum_values WHERE category = 'ATTRIBUTE'" gives you all the attributes. Then you can just include the ones with a ResourceName that contains "/campaign.".
There's probably a better way though.

Etay Tchechanovski

unread,
Jun 26, 2020, 10:49:16 AM6/26/20
to AdWords API and Google Ads API Forum
Hey Joe,
Can you share the http request you've used here?
I'm not sure which endpoint url to use..

Google Ads API Forum Advisor Prod

unread,
Jul 1, 2020, 4:32:14 PM7/1/20
to eta...@gmail.com, adwor...@googlegroups.com
Hi Etay,

Thank you for reaching out. If you still require assistance, can you please elaborate on what you are looking to do with the API? Providing these details will allow me to better assist you. 

Regards,
Danica, Google Ads API Team

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