Google Business Performance API یک روش API
جدید دارد که امکان واکشی چندین «DailyMetrics» را در یک درخواست API فراهم میکند.
زمانبندی منسوخ شدن و دستورالعملهای انتقال از روش API reportInsights v4 به API عملکرد نمایه کسبوکار Google را مرور کنید.
Method: accounts.updateNotificationSetting
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
تنظیم اعلان pubsub را برای حساب تنظیم می کند که به Google اطلاع می دهد برای کدام موضوع اعلان های pubsub ارسال کند. از قسمت notificationTypes در notificationSetting برای دستکاری رویدادهایی که یک حساب میخواهد در آنها مشترک شود استفاده کنید.
یک حساب فقط یک منبع تنظیم اعلان خواهد داشت و فقط یک موضوع pubsub را می توان تنظیم کرد. برای حذف تنظیم، با یک نوتیفیکیشن خالی بهروزرسانی کنید
درخواست HTTP
PATCH https://mybusinessnotifications.googleapis.com/v1/{notificationSetting.name=accounts/*/notificationSetting}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
مولفه های |
---|
notificationSetting.name | string ضروری. نام منبع این تنظیم برای آن است. این از فرم accounts/{account_id}/notificationSetting است. |
پارامترهای پرس و جو
مولفه های |
---|
updateMask | string ( FieldMask format) ضروری. فیلدهای خاصی که باید به روز شوند. تنها قسمت قابل ویرایش notificationSetting است. این فهرستی از نامهای فیلدهای کاملاً واجد شرایط با کاما است. مثال: "user.displayName,photo" . |
درخواست بدن
بدنه درخواست شامل یک نمونه از NotificationSetting
است.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی نمونه ای از NotificationSetting
است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/business.manage
برای اطلاعات بیشتر، به نمای کلی OAuth 2.0 مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]