REST Resource: channels
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zasób: Channel
Kanał powiadomień używany do śledzenia zmian zasobów.
Zapis JSON |
{
"params": {
string: string,
...
},
"payload": boolean,
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": string,
"type": string,
"address": string,
"kind": string
} |
Pola |
params |
map (key: string, value: string)
Dodatkowe parametry kontrolujące działanie kanału dostarczania. Opcjonalnie. Obiekt zawierający listę par "key": value . Przykład: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
payload |
boolean
Wartość logiczna wskazująca, czy ładunek jest potrzebny. Opcjonalnie.
|
id |
string
UUID lub podobny unikalny ciąg znaków, który identyfikuje ten kanał.
|
resourceId |
string
Nieczytelny identyfikator, który wskazuje zasób oglądany na tym kanale. Stabilny w różnych wersjach interfejsu API.
|
resourceUri |
string
Identyfikator oglądanego zasobu właściwy dla konkretnej wersji.
|
token |
string
Dowolny ciąg znaków dostarczany na adres docelowy z każdym powiadomieniem wysyłanym tym kanałem. Opcjonalnie.
|
expiration |
string (int64 format)
Data i godzina wygaśnięcia kanału powiadomień w formacie sygnatury czasowej systemu UNIX (w milisekundach). Opcjonalnie.
|
type |
string
Typ mechanizmu dostarczania używanego w przypadku tego kanału. Prawidłowe wartości to „web_hook” lub „webhook”.
|
address |
string
Adres, na który są dostarczane powiadomienia z tego kanału.
|
kind |
string
Określa, że jest to kanał powiadomień używany do śledzenia zmian w zasobie, czyli api#channel .
|
Metody |
|
Przestaje oglądać zasoby za pomocą tego kanału. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 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/v3/channels/stop) | Stops watching resources through this channel. |"]]