REST Resource: channels
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:頻道
JSON 表示法 |
{
"params": {
string: string,
...
},
"payload": boolean,
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": string,
"type": string,
"address": string,
"kind": string
} |
欄位 |
params |
map (key: string, value: string)
控制放送管道行為的其他參數。選用項目。 這個物件中包含 "key": value 組合的清單,範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" } 。
|
payload |
boolean
布林值,指出是否需要酬載。選用項目。
|
id |
string
用於識別這個頻道的 UUID 或類似的專屬字串。
|
resourceId |
string
不透明 ID,用於識別這個管道上受監控的資源。不同 API 版本皆適用。
|
resourceUri |
string
受監控資源的版本專屬 ID。
|
token |
string
系統會透過這個管道傳送通知,並將任意字串傳送至目標地址。選用項目。
|
expiration |
string (int64 format)
通知管道的到期日期和時間,以毫秒為單位的 Unix 時間戳記表示。選用項目。
|
type |
string
這個管道使用的傳送機制類型。有效值為「web_hook」或「webhook」。
|
address |
string
這個管道的通知傳送地址。
|
kind |
string
將此識別為用於監控資源變更的通知管道,即 api#channel 。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],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. |"]]