CalendarList: watch
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
CalendarList リソースの変更を監視します。
リクエスト
HTTP リクエスト
POST https://www.googleapis.com/calendar/v3/users/me/calendarList/watch
パラメータ
承認
このリクエストは、少なくとも次のうち 1 つのスコープによる承認が必要です。
範囲 |
https://www.googleapis.com/auth/calendar.readonly |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.calendarlist |
https://www.googleapis.com/auth/calendar.calendarlist.readonly |
詳しくは、認証と認可のページをご覧ください。
リクエストの本文
リクエストの本文には、以下の構造を使用してデータを指定してください。
{
"id": string,
"token": string,
"type": string,
"address": string,
"params": {
"ttl": string
}
}
プロパティ名 |
値 |
説明 |
メモ |
id |
string |
このチャンネルを識別する UUID または一意の文字列。 |
|
token |
string |
このチャンネル経由で通知と一緒に対象のアドレスに配布される任意の文字列。省略可。 |
|
type |
string |
このチャンネルで使用される配信方法の種類。有効な値は「web_hook 」(または「webhook 」)です。どちらの値も、Http リクエストを使用してメッセージが配信されるチャネルを指します。 |
|
address |
string |
このチャンネルの通知が配信されるアドレス。 |
|
params |
object |
配信チャンネルの操作を制御する追加のパラメータ。省略可。 |
|
params.ttl |
string |
通知チャネルの有効期間(秒単位)。デフォルトは 604,800 秒です。 |
|
レスポンス
成功すると、このメソッドは次の構造を含むレスポンスの本文を返します。
{
"kind": "api#channel",
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": long
}
プロパティ名 |
値 |
説明 |
メモ |
kind |
string |
リソースの変更を監視するために使用される通知チャンネルとして識別します(「api#channel 」)。 |
|
id |
string |
このチャンネルを識別する UUID または一意の文字列。 |
|
resourceId |
string |
このチャンネルで監視するリソースを識別する不透明な ID。異なる API バージョンでも安定しています。 |
|
resourceUri |
string |
監視対象のリソースのバージョン固有の ID。 |
|
token |
string |
このチャンネル経由で通知と一緒に対象のアドレスに配布される任意の文字列。省略可能。 |
|
expiration |
long |
通知チャンネルの有効期限。Unix のタイムスタンプでミリ秒単位で表示されます。省略可。 |
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# CalendarList: watch\n\n| **Note:** Requires [authorization](#auth).\n\nWatch for changes to CalendarList resources.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/calendar/v3/users/me/calendarList/watch\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|-------|-------------|\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes:\n\n| Scope |\n|------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/calendar.readonly` |\n| `https://www.googleapis.com/auth/calendar` |\n| `https://www.googleapis.com/auth/calendar.calendarlist` |\n| `https://www.googleapis.com/auth/calendar.calendarlist.readonly` |\n\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nIn the request body, supply data with the following structure:\n\n```carbon\n{\n \"id\": string,\n \"token\": string,\n \"type\": string,\n \"address\": string,\n \"params\": {\n \"ttl\": string\n }\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|\n| `id` | `string` | A UUID or similar unique string that identifies this channel. | |\n| `token` | `string` | An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. | |\n| `type` | `string` | The type of delivery mechanism used for this channel. Valid values are \"`web_hook`\" (or \"`webhook`\"). Both values refer to a channel where Http requests are used to deliver messages. | |\n| `address` | `string` | The address where notifications are delivered for this channel. | |\n| `params` | `object` | Additional parameters controlling delivery channel behavior. Optional. | |\n| params.`ttl` | `string` | The time-to-live in seconds for the notification channel. Default is 604800 seconds. | |\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```text\n{\n \"kind\": \"api#channel\",\n \"id\": string,\n \"resourceId\": string,\n \"resourceUri\": string,\n \"token\": string,\n \"expiration\": long\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|-------------------------------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | Identifies this as a notification channel used to watch for changes to a resource, which is \"`api#channel`\". | |\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` | `long` | Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. | |"]]