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
  • 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

詳しくは、承認ガイドをご覧ください。