Hi Ben,
Thank you for reaching out. I would suggest you to check out this sample
code
<https://developers.google.com/google-ads/api/docs/samples/handle-partial-failure>
on
how you could handle partial failures. For partial failures, all failed
requests will be recorded while all successful requests will pass through.
This said, you could just run the batch operation again excluding the ones
that are successful.
Let me know if this helps. Feel free to write back if you have further
clarifications.
Regards,
Dave
Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
On 05/15/19 21:55:11 [email protected] wrote:
Hello,
I have a more general design question for making changes to a Google Ads
account through the API.
Does anyone have any advice on how to retry sweeping account changes or
write code that interacts with the API in an idempotent way?
For example, if I was trying to create several campaigns and ad groups, I
can batch up the create operations into two api requests (one for executing
all the create campaign operations and one for all the create ad group
operations). However, if something goes wrong in the middle of creating ad
groups, as far as I can tell there is no way to easily re-run these changes
in an idempotent way because the campaigns have already been created and I
cannot recreate campaigns with the same names (even after removing the old
campaigns, the names must be unique among all removed and active campaigns).
The closest thing I can think is to check (before every create operation)
if an object already exists with a similar name, and if so, skip creating
the new object. However, this would require an API call to check on Google
Ads for the existence of an object for every creation operation and would
kind of mute the entire point of batching create operations into one API
request.
Would be nice to have COMMIT and ROLLBACK operations in the API.
Advice?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/7f90b95d-dc11-41dc-8950-2049f4223fae%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/7f90b95d-dc11-41dc-8950-2049f4223fae%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/18vg1l00000000008ug0om0007q164y6kmjedhk74o30c1g68r3adhj%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.