Method: subscriptions.list
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำขอ HTTP
GET https://workspaceevents.googleapis.com/v1beta/subscriptions
URL ใช้ไวยากรณ์การแปลงรหัส gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
pageSize |
integer
ไม่บังคับ จำนวนการสมัครใช้บริการสูงสุดที่จะแสดง บริการอาจแสดงผลน้อยกว่าค่านี้ หากไม่ได้ระบุหรือตั้งค่าเป็น 0 ระบบจะแสดงผลการติดตามสูงสุด 50 รายการ ค่าสูงสุดคือ 100 หากคุณระบุค่ามากกว่า 100 ระบบจะแสดงผลการติดตามเพียง 100 รายการ
|
pageToken |
string
ไม่บังคับ โทเค็นหน้าเว็บที่ได้รับจากการเรียกใช้ list subscriptions ก่อนหน้านี้ ระบุพารามิเตอร์นี้เพื่อดึงข้อมูลหน้าถัดไป เมื่อแบ่งหน้า ค่าตัวกรองควรตรงกับการเรียกที่ให้โทเค็นหน้าเว็บ การส่งค่าอื่นอาจทำให้เกิดผลลัพธ์ที่ไม่คาดคิด
|
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
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eLists existing Google Workspace subscriptions, allowing developers to manage event delivery configurations.\u003c/p\u003e\n"],["\u003cp\u003eProvides filtering options by event types and target resources for refined subscription retrieval.\u003c/p\u003e\n"],["\u003cp\u003eUses pagination to handle large result sets, enabling retrieval of subscriptions in manageable chunks.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific authorization scopes for access, ensuring secure management of sensitive data.\u003c/p\u003e\n"],["\u003cp\u003eAvailable within the Google Workspace Developer Preview Program, offering early access to this functionality.\u003c/p\u003e\n"]]],["This describes how to list Google Workspace subscriptions using a `GET` request to `https://workspaceevents.googleapis.com/v1beta/subscriptions`. You can filter subscriptions by event type and target resource using the `filter` query parameter. Optional parameters include `pageSize` (max 100) and `pageToken` for pagination. The request body must be empty. The response contains a list of subscriptions and a `nextPageToken` for subsequent pages. Access requires specified OAuth scopes.\n"],null,["# Method: subscriptions.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListSubscriptionsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](/workspace/preview), which grants early access to certain features.\n\nLists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).\n\n### HTTP request\n\n`GET https://workspaceevents.googleapis.com/v1beta/subscriptions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to `0`, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions. |\n| `pageToken` | `string` Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results. |\n| `filter` | `string` Required. A query filter. You can filter subscriptions by event type (`event_types`) and target resource (`target_resource`). You must specify at least one event type in your query. To filter for multiple event types, use the `OR` operator. To filter by both event type and target resource, use the `AND` operator and specify the full resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, the following queries are valid: 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}\" The server rejects invalid queries with an `INVALID_ARGUMENT` error. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe response message for [SubscriptionsService.ListSubscriptions](/workspace/events/reference/rest/v1beta/subscriptions/list#google.apps.events.subscriptions.v1beta.SubscriptionsService.ListSubscriptions).\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"subscriptions\": [ { object (/workspace/events/reference/rest/v1beta/subscriptions#Subscription) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `subscriptions[]` | `object (`[Subscription](/workspace/events/reference/rest/v1beta/subscriptions#Subscription)`)` List of subscriptions. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/chat.bot`\n- `\n https://www.googleapis.com/auth/chat.spaces`\n- `\n https://www.googleapis.com/auth/chat.spaces.readonly`\n- `\n https://www.googleapis.com/auth/chat.messages`\n- `\n https://www.googleapis.com/auth/chat.messages.readonly`\n- `\n https://www.googleapis.com/auth/chat.messages.reactions`\n- `\n https://www.googleapis.com/auth/chat.messages.reactions.readonly`\n- `\n https://www.googleapis.com/auth/chat.memberships`\n- `\n https://www.googleapis.com/auth/chat.memberships.readonly`\n- `\n https://www.googleapis.com/auth/meetings.space.created`\n- `\n https://www.googleapis.com/auth/meetings.space.readonly`\n- `\n https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.file`\n- `\n https://www.googleapis.com/auth/drive.metadata`\n- `\n https://www.googleapis.com/auth/drive.metadata.readonly`\n- `\n https://www.googleapis.com/auth/drive.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]