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
מזהה אטום שמזהה את המשאב שנמצא במעקב בערוץ הזה. יציב בגרסאות שונות של ה-API.
|
resourceUri |
string
מזהה ספציפי לגרסה של המשאב שנמצא במעקב.
|
token |
string
מחרוזת שרירותית שמועברת לכתובת היעד עם כל התראה שמועברת בערוץ הזה. אופציונלי.
|
expiration |
string (int64 format)
התאריך והשעה של תפוגת ערוץ ההתראות, בפורמט חותמת זמן של מערכת Unix, באלפיות השנייה. אופציונלי.
|
type |
string
סוג מנגנון המסירה שמשמש בערוץ הזה. הערכים התקינים הם web_hook או webhook.
|
address |
string
הכתובת שאליה נשלחות ההתראות מהערוץ הזה.
|
kind |
string
הערך הזה מציין שערוץ ההתראות משמש למעקב אחרי שינויים במשאב, שהוא api#channel .
|
Methods |
|
הצפייה במשאבים דרך הערוץ הזה תופסק. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]