Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
Method: accounts.updateNotificationSetting
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตั้งค่าการแจ้งเตือน PubSub สำหรับบัญชีที่จะแจ้ง Google เกี่ยวกับหัวข้อที่จะส่งการแจ้งเตือน PubSub ใช้ช่อง notificationsTypes ภายใน notificationsSetting เพื่อจัดการกับเหตุการณ์ที่บัญชีต้องการสมัครใช้บริการ
แต่ละบัญชีจะมีทรัพยากรการตั้งค่าการแจ้งเตือนเพียงรายการเดียว และสามารถตั้งค่าหัวข้อ PubSub ได้เพียงรายการเดียว หากต้องการลบการตั้งค่า ให้อัปเดตโดยใช้ notificationsTypes ที่ว่างเปล่า
คำขอ HTTP
PATCH https://mybusinessnotifications.googleapis.com/v1/{notificationSetting.name=accounts/*/notificationSetting}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
notificationSetting.name |
string
ต้องระบุ ชื่อทรัพยากรที่ใช้การตั้งค่านี้ นี่เป็นแบบฟอร์ม accounts/{account_id}/notificationSetting
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
updateMask |
string (FieldMask format)
ต้องระบุ ช่องเฉพาะที่ควรอัปเดต ช่องเดียวที่แก้ไขได้คือ notificationsSetting ซึ่งเป็นรายการชื่อฟิลด์ที่คั่นด้วยคอมมา ตัวอย่าง: "user.displayName,photo"
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ NotificationSetting
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ NotificationSetting
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/business.manage
ดูข้อมูลเพิ่มเติมได้ที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eAllows configuration of Pub/Sub notification settings for Google My Business accounts to receive event updates.\u003c/p\u003e\n"],["\u003cp\u003eOnly one notification setting and Pub/Sub topic are allowed per account; update with empty notificationTypes to delete the setting.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eUses a PATCH request to \u003ccode\u003ehttps://mybusinessnotifications.googleapis.com/v1/{notificationSetting.name=accounts/*/notificationSetting}\u003c/code\u003e to update settings.\u003c/p\u003e\n"],["\u003cp\u003eProvides a \u003ccode\u003enotificationTypes\u003c/code\u003e field within the \u003ccode\u003enotificationSetting\u003c/code\u003e object for managing event subscriptions.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.updateNotificationSetting\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nSets the pubsub notification setting for the account informing Google which topic to send pubsub notifications for. Use the notificationTypes field within notificationSetting to manipulate the events an account wants to subscribe to.\n\nAn account will only have one notification setting resource, and only one pubsub topic can be set. To delete the setting, update with an empty notificationTypes\n\n### HTTP request\n\n`PATCH https://mybusinessnotifications.googleapis.com/v1/{notificationSetting.name=accounts/*/notificationSetting}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------------------|----------------------------------------------------------------------------------------------------------------------------|\n| `notificationSetting.name` | `string` Required. The resource name this setting is for. This is of the form `accounts/{account_id}/notificationSetting`. |\n\n### Query parameters\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` Required. The specific fields that should be updated. The only editable field is notificationSetting. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [NotificationSetting](/my-business/reference/notifications/rest/v1/NotificationSetting).\n\n### Response body\n\nIf successful, the response body contains an instance of [NotificationSetting](/my-business/reference/notifications/rest/v1/NotificationSetting).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]