Acl: watch
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Sprawdź, czy zasoby listy kontroli dostępu uległy zmianie.
Żądanie
Żądanie HTTP
POST https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/watch
Parametry
Nazwa parametru |
Wartość |
Opis |
Parametry ścieżki |
calendarId |
string |
Identyfikator kalendarza. Aby pobrać identyfikatory kalendarzy, wywołaj metodę calendarList.list. Jeśli chcesz uzyskać dostęp do głównego kalendarza aktualnie zalogowanego użytkownika, użyj słowa kluczowego „primary ”.
|
Autoryzacja
Ta prośba wymaga autoryzacji z co najmniej jednym z tych zakresów:
Zakres |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.acls |
https://www.googleapis.com/auth/calendar.acls.readonly |
Więcej informacji znajdziesz na stronie Uwierzytelnianie i autoryzacja.
Treść żądania
Dane w treści żądania muszą mieć poniższy format:
{
"id": string,
"token": string,
"type": string,
"address": string,
"params": {
"ttl": string
}
}
Nazwa usługi |
Wartość |
Opis |
Uwagi |
id |
string |
Identyfikator UUID lub podobny unikalny ciąg znaków identyfikujący ten kanał. |
|
token |
string |
dowolny ciąg znaków dostarczany na adres docelowy wraz z każdym powiadomieniem wysyłanym przez ten kanał. Opcjonalnie: |
|
type |
string |
Typ mechanizmu wyświetlania używanego na tym kanale. Prawidłowe wartości to „web_hook ” (lub „webhook ”). Obie wartości odnoszą się do kanału, w którym do przesyłania wiadomości używane są żądania HTTP. |
|
address |
string |
Adres, na który wysyłane są powiadomienia z tego kanału. |
|
params |
object |
Dodatkowe parametry kontrolujące działanie kanału dostawczego. Opcjonalnie: |
|
params.ttl |
string |
Czas życia w sekundach dla kanału powiadomień. Wartość domyślna to 60 4800 sekund. |
|
Odpowiedź
Jeśli operacja się powiedzie, metoda zwróci odpowiedź o tej strukturze:
{
"kind": "api#channel",
"id": string,
"resourceId": string,
"resourceUri": string,
"token": string,
"expiration": long
}
Nazwa usługi |
Wartość |
Opis |
Uwagi |
kind |
string |
Określa ten kanał powiadomień jako kanał używany do sprawdzania zmian w zasobach (wartość „api#channel ”). |
|
id |
string |
Identyfikator UUID lub podobny unikalny ciąg znaków identyfikujący ten kanał. |
|
resourceId |
string |
Nieczytelny identyfikator identyfikujący zasób odtwarzany na tym kanale. stabilny w różnych wersjach interfejsu API; |
|
resourceUri |
string |
Identyfikator wersji zasobu monitorowanego. |
|
token |
string |
dowolny ciąg znaków dostarczany na adres docelowy wraz z każdym powiadomieniem wysyłanym przez ten kanał. Opcjonalnie: |
|
expiration |
long |
Data i godzina wygaśnięcia kanału powiadomień wyrażona jako sygnatura czasowa systemu UNIX w milisekundach. Opcjonalnie: |
|
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,["# Acl: watch\n\n| **Note:** Requires [authorization](#auth).\n\nWatch for changes to ACL resources.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/watch\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `calendarId` | `string` | Calendar identifier. To retrieve calendar IDs call the [calendarList.list](/workspace/calendar/api/v3/reference/calendarList/list) method. If you want to access the primary calendar of the currently logged in user, use the \"`primary`\" keyword. |\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` |\n| `https://www.googleapis.com/auth/calendar.acls` |\n| `https://www.googleapis.com/auth/calendar.acls.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. | |"]]