Hi Conor, You will need the IDs of the AdGroups, but if you only know the names you could do the following:
1. Issue an AdGroupService.get <https://developers.google.com/adwords/api/docs/reference/v201406/AdGroupService#get> where your *Predicate* filters on CampaignId <https://developers.google.com/adwords/api/docs/reference/v201406/AdGroupService.AdGroup#campaignId> and your *Selector* includes the *Id* field. 2. From those results, collect the AdGroup IDs. 3. Issue an AdGroupService.mutate <https://developers.google.com/adwords/api/docs/reference/v201406/AdGroupService#mutate> containing *AdGroup*s where you only populate the *Id* field. If you're using one of our client libraries (and hopefully you are - they make life much easier!), check out the GetAdGroups <https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201406/basicoperations/GetAdGroups.java> and RemoveAdGroup <https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201406/basicoperations/RemoveAdGroup.java> examples -- they do precisely what I described above. Cheers, Josh, AdWords API Team On Tuesday, September 23, 2014 6:11:15 AM UTC-4, [email protected] wrote: > > Hi All, > > I want to remove all AdGroups within a campaign. Can this be done without > having access to the specific AdGroup Ids first. Is this possible? > > Thanks, > Conor > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] 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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/839afbe1-42a8-4fc2-a4f6-bcbf024ddde8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
