REST Resource: channels
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Ressource : Channel
Canal de notification utilisé pour surveiller les modifications apportées aux ressources.
Représentation JSON |
{
"params": {
string: string,
...
},
"payload": boolean,
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": string,
"type": string,
"address": string,
"kind": string
} |
Champs |
params |
map (key: string, value: string)
Paramètres supplémentaires contrôlant le comportement du canal de diffusion. Facultatif. Objet contenant une liste de paires "key": value . Exemple : { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
payload |
boolean
Valeur booléenne indiquant si la charge utile est souhaitée. Facultatif.
|
id |
string
UUID ou chaîne unique similaire identifiant ce canal.
|
resourceId |
string
ID opaque qui identifie la ressource surveillée sur ce canal. Stable dans différentes versions de l'API.
|
resourceUri |
string
Identifiant spécifique à la version pour la ressource surveillée.
|
token |
string
Chaîne arbitraire envoyée à l'adresse cible avec chaque notification envoyée sur ce canal. Facultatif.
|
expiration |
string (int64 format)
Date et heure d'expiration du canal de notification, exprimées sous la forme d'un code temporel Unix, en millisecondes. Facultatif.
|
type |
string
Type de mécanisme de diffusion utilisé pour ce canal. Les valeurs valides sont "web_hook" ou "webhook".
|
address |
string
Adresse à laquelle les notifications sont envoyées pour ce canal.
|
kind |
string
Identifie ce canal de notification comme étant utilisé pour surveiller les modifications apportées à une ressource, qui est api#channel .
|
Méthodes |
|
Arrête de regarder les ressources sur cette chaîne. |
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)."],[],[],null,["# REST Resource: channels\n\n- [Resource: Channel](#Channel)\n - [JSON representation](#Channel.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Channel\n-----------------\n\nA notification channel used to watch for resource changes.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"params\": { string: string, ... }, \"payload\": boolean, \"id\": string, \"resourceId\": string, \"resourceUri\": string, \"token\": string, \"expiration\": string, \"type\": string, \"address\": string, \"kind\": string } ``` |\n\n| Fields ||\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `params` | `map (key: string, value: string)` Additional parameters controlling delivery channel behavior. Optional. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n| `payload` | `boolean` A Boolean value to indicate whether payload is wanted. Optional. |\n| `id` | `string` A UUID or similar unique string that identifies this channel. |\n| `resourceId` | `string` An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |\n| `resourceUri` | `string` A version-specific identifier for the watched resource. |\n| `token` | `string` An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |\n| `expiration` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |\n| `type` | `string` The type of delivery mechanism used for this channel. Valid values are \"web_hook\" or \"webhook\". |\n| `address` | `string` The address where notifications are delivered for this channel. |\n| `kind` | `string` Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`. |\n\n| Methods ------- ||\n|------------------------------------------------------------------|------------------------------------------------|\n| ### [stop](/workspace/drive/api/reference/rest/v2/channels/stop) | Stops watching resources through this channel. |"]]