שינויים בכמות גדולה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אם אתם צריכים לבצע פעולות על סוגים שונים של ישויות בו-זמנית או שאתם מעדיפים לכתוב מול נקודת קצה אחת במקום להשתמש בנקודת קצה נפרדת לכל סוג משאב, אתם יכולים להשתמש בנקודת הקצה GoogleAdsService.Mutate
לכל פעולות השינוי הנתמכות.
פעולות שינוי
כל MutateGoogleAdsRequest
מקבל MutateOperation
שחוזר על עצמו, וכל אחד מהם יכול לכלול פעולה אחת עבור סוג משאב אחד. כדי ליצור קמפיין אחד וקבוצת מודעות אחת בקריאה אחת של GoogleAdsService.Mutate
, צריך ליצור שתי ישויות MutateOperation
(אחת בשביל CampaignOperation
ואחת בשביל AdGroupOperation
), ואז להעביר את שתיהן אל GoogleAdsService
.
Ruby
mutate_operation1 = client.operation(:Mutate)
mutate_operation2 = client.operation(:Mutate)
campaign_operation = client.operation(:Campaign)
ad_group_operation = client.operation(:AdGroup)
# Do some setup here to get campaign_operation and ad_group_operation into the
# state you would want them for a regular mutate call to their respective
# services.
mutate_operation1.campaign_operation = campaign_operation
mutate_operation2.ad_group_operation = ad_group_operation
google_ads_service.mutate(customer_id, [mutate_operation1, mutate_operation2])
בדומה לשירותים אחרים, נקודת הקצה הזו תומכת בכשל חלקי ובאימות בלבד.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-27 (שעון UTC)."],[[["\u003cp\u003eUse the \u003ccode\u003eGoogleAdsService.Mutate\u003c/code\u003e endpoint to operate on different entity types or prefer a single endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMutateGoogleAdsRequest\u003c/code\u003e accepts multiple \u003ccode\u003eMutateOperation\u003c/code\u003e entities, each handling a single operation for one resource type.\u003c/p\u003e\n"],["\u003cp\u003eConstruct separate \u003ccode\u003eMutateOperation\u003c/code\u003e objects for each desired operation, like creating a campaign and an ad group, and pass them to \u003ccode\u003eGoogleAdsService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis endpoint supports partial failure handling and validate-only requests, similar to other Google Ads API services.\u003c/p\u003e\n"]]],[],null,["# Bulk Mutates\n\nIf you need to operate on different types of entities at the same time or\nprefer to write against a single endpoint rather than using a separate endpoint\nper resource type, then you can use the\n[`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate)\nendpoint for all supported mutate operations.\n| **Note:** You can see the full list of supported operations on the reference page for [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation).\n\nMutate operations\n-----------------\n\nEach [`MutateGoogleAdsRequest`](/google-ads/api/reference/rpc/v21/MutateGoogleAdsRequest)\naccepts a repeated [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation), each of\nwhich can include a single operation for one resource type. To create one\ncampaign and one ad group in a single\n[`GoogleAdsService.Mutate`](/google-ads/api/reference/rpc/v21/GoogleAdsService/Mutate) call,\nyou would need to create two [`MutateOperation`](/google-ads/api/reference/rpc/v21/MutateOperation)\nentities (one for the [`CampaignOperation`](/google-ads/api/reference/rpc/v21/CampaignOperation),\nthe other for the [`AdGroupOperation`](/google-ads/api/reference/rpc/v21/AdGroupOperation)),\nand then pass both to\n[`GoogleAdsService`](/google-ads/api/reference/rpc/v21/GoogleAdsService). \n\n### Ruby\n\n mutate_operation1 = client.operation(:Mutate)\n mutate_operation2 = client.operation(:Mutate)\n\n campaign_operation = client.operation(:Campaign)\n ad_group_operation = client.operation(:AdGroup)\n\n # Do some setup here to get campaign_operation and ad_group_operation into the\n # state you would want them for a regular mutate call to their respective\n # services.\n\n mutate_operation1.campaign_operation = campaign_operation\n mutate_operation2.ad_group_operation = ad_group_operation\n\n google_ads_service.mutate(customer_id, [mutate_operation1, mutate_operation2])\n\nLike other services, this endpoint supports\n[partial failure](/google-ads/api/docs/best-practices/partial-failures) and\nvalidate-only."]]