Acl: insert
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Erişim denetimi kuralı oluşturur.
Şimdi deneyin.
İstek
HTTP isteği
POST https://www.googleapis.com/calendar/v3/calendars/calendarId/acl
Parametreler
Parametre adı |
Değer |
Açıklama |
Yol parametreleri |
calendarId |
string |
Takvim tanımlayıcısı. Takvim kimliklerini almak için calendarList.list yöntemini çağırın. Şu anda oturum açmış kullanıcının birincil takvimine erişmek istiyorsanız "primary " anahtar kelimesini kullanın.
|
İsteğe bağlı sorgu parametreleri |
sendNotifications |
boolean |
Takvim paylaşımı değişikliğiyle ilgili bildirim gönderilip gönderilmeyeceği. İsteğe bağlı. Varsayılan değer True'dur.
|
Yetkilendirme
Bu istek için aşağıdaki kapsamlardan en az biri ile yetkilendirme gerekir:
Kapsam |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.acls |
Daha fazla bilgi için kimlik doğrulama ve yetkilendirme sayfasına bakın.
İstek içeriği
İsteğin gövdesinde, aşağıdaki özelliklere sahip bir Acl kaynağı sağlayın:
Mülk adı |
Değer |
Açıklama |
Notlar |
Zorunlu Özellikler |
role |
string |
Kapsama alanına atanan rol. Olası değerler: - "
none ": Erişim sağlamaz. - "
freeBusyReader ": Boş/meşgul bilgilerine okuma erişimi sağlar. - "
reader ": Takvime okuma erişimi sağlar. Gizli etkinlikler, okuyucu erişimi olan kullanıcılara gösterilir ancak etkinlik ayrıntıları gizlenir. - "
writer ": Takvime okuma ve yazma erişimi sağlar. Gizli etkinlikler, yazar erişimi olan kullanıcılara gösterilir ve etkinlik ayrıntıları görünür. Takvimdeki ACL'lere okuma erişimi sağlar. - "
owner ": Takvim sahibidir. Bu rol, ACL'leri değiştirme özelliğinin yanı sıra yazar rolünün tüm izinlerine sahiptir. |
yazılabilir
|
scope |
object |
Bu ACL kuralı tarafından takvim erişiminin ne ölçüde verildiği. |
|
scope.type |
string |
Kapsamın türü. Olası değerler: - "
default ": Herkese açık kapsam. Bu, varsayılan değerdir. - "
user ": Kapsamı tek bir kullanıcıyla sınırlar. - "
group ": Kapsamı bir grupla sınırlandırır. - "
domain ": Kapsamı bir alanla sınırlandırır. Not: "default " veya herkese açık kapsama verilen izinler, kimliği doğrulanmış olsun veya olmasın tüm kullanıcılar için geçerlidir. |
|
İsteğe bağlı özellikler |
scope.value |
string |
Kapsam türüne bağlı olarak bir kullanıcının veya grubun e-posta adresi ya da alanın adı. "default " türü için atlandı. |
yazabilir
|
Yanıt
Başarılı olursa bu yöntem, yanıt gövdesinde bir Acl kaynağı döndürür.
Deneyin!
Canlı verilerde bu yöntemi çağırmak ve yanıtı görmek için aşağıdaki API Gezgini'ni kullanın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-25 UTC."],[],[],null,["# Acl: insert\n\n| **Note:** Requires [authorization](#auth).\n\nCreates an access control rule.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/calendar/v3/calendars/calendarId/acl\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| **Optional query parameters** |||\n| `sendNotifications` | `boolean` | Whether to send notifications about the calendar sharing change. Optional. The default is True. |\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\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nIn the request body, supply an [Acl resource](/workspace/calendar/api/v3/reference/acl#resource) with the following properties:\n\n| Property name | Value | Description | Notes |\n|---------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|\n| **Required Properties** ||||\n| `role` | `string` | The role assigned to the scope. Possible values are: - \"`none`\" - Provides no access. - \"`freeBusyReader`\" - Provides read access to free/busy information. - \"`reader`\" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden. - \"`writer`\" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible. Provides read access to the calendar's ACLs. - \"`owner`\" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to manipulate ACLs. | writable |\n| `scope` | `object` | The extent to which [calendar access](https://developers.google.com/workspace/calendar/concepts/sharing#sharing_calendars) is granted by this ACL rule. | |\n| scope.`type` | `string` | The type of the scope. Possible values are: - \"`default`\" - The public scope. This is the default value. - \"`user`\" - Limits the scope to a single user. - \"`group`\" - Limits the scope to a group. - \"`domain`\" - Limits the scope to a domain. Note: The permissions granted to the \"`default`\", or public, scope apply to any user, authenticated or not. | |\n| **Optional Properties** ||||\n| scope.`value` | `string` | The email address of a user or group, or the name of a domain, depending on the scope type. Omitted for type \"`default`\". | writable |\n\nResponse\n--------\n\nIf successful, this method returns an [Acl resource](/workspace/calendar/api/v3/reference/acl#resource) in the response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]