L'API
Google Business Performance propose une
NOUVELLE méthode qui permet d'extraire plusieurs `DailyMetrics` avec une seule requête API.
Consultez le
planning d'abandon et les instructions pour migrer de la méthode API reportInsights v4 à l'API Google Business Profile Performance.
Method: accounts.updateNotificationSetting
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Définit le paramètre de notification Pub/Sub du compte pour indiquer à Google le sujet pour lequel envoyer des notifications Pub/Sub. Utilisez le champ notificationTypes dans notificationSetting pour manipuler les événements auxquels un compte souhaite s'abonner.
Un compte n'aura qu'une seule ressource de paramètre de notification, et un seul sujet Pub/Sub peut être défini. Pour supprimer le paramètre, mettez à jour avec un champ notificationTypes vide
Requête HTTP
PATCH https://mybusinessnotifications.googleapis.com/v1/{notificationSetting.name=accounts/*/notificationSetting}
L'URL utilise la syntaxe de transcodage gRPC.
Paramètres de chemin d'accès
Paramètres |
notificationSetting.name |
string
Obligatoire. Nom de ressource auquel ce paramètre est destiné. au format accounts/{account_id}/notificationSetting .
|
Paramètres de requête
Paramètres |
updateMask |
string (FieldMask format)
Obligatoire. Champs spécifiques à mettre à jour. Le seul champ modifiable est notificationSetting. Il s'agit d'une liste de noms complets de champs séparés par une virgule. Exemple : "user.displayName,photo"
|
Corps de la requête
Le corps de la requête contient une instance NotificationSetting
.
Corps de la réponse
Si la requête aboutit, le corps de la réponse contient une instance de NotificationSetting
.
Champs d'application des autorisations
Requiert le niveau d'accès OAuth suivant :
https://www.googleapis.com/auth/business.manage
Pour en savoir plus, consultez la présentation d'OAuth 2.0.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 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)."]]