Method: subscriptions.list

Google Workspace サブスクリプションを一覧表示します。この方法の使用方法については、Google Workspace サブスクリプションを一覧表示するをご覧ください。

HTTP リクエスト

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

この URL は gRPC Transcoding 構文を使用します。

クエリ パラメータ

パラメータ
pageSize

integer

(省略可)返される定期購入の最大数。サービスはこの値より少ない数を返す可能性があります。

指定しないか 0 に設定した場合、最大 50 個のサブスクリプションが返されます。

最大値は 100 です。100 を超える値を指定すると、100 個のサブスクリプションのみが返されます。

pageToken

string

(省略可)前回の購読リスト呼び出しで受信したページトークン。このパラメータを指定すると、後続のページを取得できます。

ページ分けを行う際、フィルタ値はページトークンを提供した呼び出しと一致する必要があります。異なる値を渡すと、予期しない結果が生じる可能性があります。

filter

string

必須。クエリフィルタ。

イベントタイプ(event_types)とターゲット リソース(target_resource)でサブスクリプションをフィルタできます。

クエリには少なくとも 1 つのイベントタイプを指定する必要があります。複数のイベントタイプをフィルタするには、OR 演算子を使用します。

イベントタイプとターゲット リソースの両方でフィルタするには、AND 演算子を使用して、//chat.googleapis.com/spaces/{space} などの完全なリソース名を指定します。

たとえば、次のクエリは有効です。

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}"

サーバーは INVALID_ARGUMENT エラーで無効なクエリを拒否します。

リクエスト本文

リクエストの本文は空にする必要があります。

レスポンスの本文

SubscriptionsService.ListSubscriptions に対するレスポンス メッセージ。

成功すると、レスポンスの本文に次の構造のデータが含まれます。

JSON 表現
{
  "subscriptions": [
    {
      object (Subscription)
    }
  ],
  "nextPageToken": string
}
フィールド
subscriptions[]

object (Subscription)

サブスクリプションのリスト。

nextPageToken

string

次のページを取得するために pageToken として送信できるトークン。このフィールドを省略すると、後続のページはなくなります。

認可スコープ

次の OAuth スコープのいずれかが必要です。

  • 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

詳細については、承認ガイドをご覧ください。