Method: subscriptions.list

Google Workspace aboneliklerini listeler. Bu yöntemi nasıl kullanacağınızı öğrenmek için Google Workspace aboneliklerini listeleme başlıklı makaleyi inceleyin.

HTTP isteği

GET https://workspaceevents.googleapis.com/v1beta/subscriptions

URL, gRPC Kod Dönüştürme söz dizimini kullanır.

Sorgu parametreleri

Parametreler
pageSize

integer

İsteğe bağlıdır. Döndürülecek maksimum abonelik sayısı. Hizmet, bu değerden daha az sonuç döndürebilir.

Belirtilmezse veya 0 olarak ayarlanırsa en fazla 50 abonelik döndürülür.

Maksimum değer 100'dür. 100'den büyük bir değer belirtirseniz sistem yalnızca 100 abonelik döndürür.

pageToken

string

İsteğe bağlıdır. Önceki bir list subscriptions çağrısından alınan sayfa jetonu. Sonraki sayfayı almak için bu parametreyi sağlayın.

Sayfalama yaparken filtre değeri, sayfa jetonunu sağlayan çağrıyla eşleşmelidir. Farklı bir değer iletmek beklenmedik sonuçlara yol açabilir.

filter

string

Zorunlu. Sorgu filtresi.

Abonelikleri etkinlik türüne (event_types) ve hedef kaynağa (target_resource) göre filtreleyebilirsiniz.

Sorgunuzda en az bir etkinlik türü belirtmeniz gerekir. Birden fazla etkinlik türüne göre filtrelemek için OR operatörünü kullanın.

Hem etkinlik türüne hem de hedef kaynağa göre filtrelemek için AND operatörünü kullanın ve tam kaynak adını (ör. //chat.googleapis.com/spaces/{space}) belirtin.

Örneğin, aşağıdaki sorgular geçerlidir:

event_types:"google.workspace.chat.membership.v1.updated" OR
  event_types:"google.workspace.chat.message.v1.created"

event_types:"google.workspace.chat.message.v1.created" AND
  target_resource="//chat.googleapis.com/spaces/{space}"

( event_types:"google.workspace.chat.membership.v1.updated" OR
  event_types:"google.workspace.chat.message.v1.created" ) AND
  target_resource="//chat.googleapis.com/spaces/{space}"

Sunucu, geçersiz sorguları INVALID_ARGUMENT hatasıyla reddeder.

İstek içeriği

İstek metni boş olmalıdır.

Yanıt gövdesi

SubscriptionsService.ListSubscriptions için yanıt mesajı.

Başarılı olursa yanıt metni aşağıdaki yapıyla birlikte verileri içerir:

JSON gösterimi
{
  "subscriptions": [
    {
      object (Subscription)
    }
  ],
  "nextPageToken": string
}
Alanlar
subscriptions[]

object (Subscription)

Abonelik listesi.

nextPageToken

string

Sonraki sayfayı almak için pageToken olarak gönderilebilen bir jeton. Bu alan atlanırsa sonraki sayfa olmaz.

Yetkilendirme kapsamları

Aşağıdaki OAuth kapsamlarından birini gerektirir:

  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/meetings.space.created
  • https://www.googleapis.com/auth/meetings.space.readonly
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

Daha fazla bilgi için Yetkilendirme kılavuzu'na bakın.