Method: alerts.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://alertcenter.googleapis.com/v1beta1/alerts
网址采用 gRPC 转码语法。
查询参数
参数 |
customerId |
string
可选。与提醒关联的客户的 Google Workspace 账号的唯一标识符。customerId 必须去除首字母“C”(例如 046psxkn )。如果未提供,系统会从调用方身份推断出此值。查找您的客户 ID。
|
pageSize |
integer
可选。请求的页面大小。服务器返回的项可能要比请求的少。如果未指定,服务器会选择相应的默认值。
|
pageToken |
string
可选。标识服务器应返回的结果页面的令牌。 如果为空,则会启动新的迭代。如需继续迭代,请传入上一个 ListAlertsResponse 的 nextPageToken 字段中的值。
|
filter |
string
可选。用于过滤提醒结果的查询字符串。如需了解详情,请参阅查询过滤条件和支持的查询过滤条件字段。
|
orderBy |
string
可选。列表结果的排序顺序。如果未指定,系统可能会以任意顺序返回结果。您可以使用 orderBy="createTime desc" 按创建时间戳对结果进行降序排序。目前支持的排序方式包括 createTime asc 、createTime desc 、updateTime desc
|
响应正文
用于列出提醒的请求的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"alerts": [
{
object (Alert )
}
],
"nextPageToken": string
} |
字段 |
alerts[] |
object (Alert )
提醒列表。
|
nextPageToken |
string
下一页的令牌。如果不为空,则表示可能有更多与商品详情请求匹配的提醒;此值可在后续的 ListAlertsRequest 中使用,以获取从当前列表调用的上一个结果继续显示的提醒。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/apps.alerts
如需了解详情,请参阅授权指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Method: alerts.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.ListAlertsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n\nLists the alerts.\n\n### HTTP request\n\n`GET https://alertcenter.googleapis.com/v1beta1/alerts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerId` | `string` Optional. The unique identifier of the Google Workspace account of the customer the alerts are associated with. The `customerId` must have the initial \"C\" stripped (for example, `046psxkn`). Inferred from the caller identity if not provided. [Find your customer ID](https://support.google.com/cloudidentity/answer/10070793). |\n| `pageSize` | `integer` Optional. The requested page size. Server may return fewer items than requested. If unspecified, server picks an appropriate default. |\n| `pageToken` | `string` Optional. A token identifying a page of results the server should return. If empty, a new iteration is started. To continue an iteration, pass in the value from the previous ListAlertsResponse's [nextPageToken](/workspace/admin/alertcenter/reference/rest/v1beta1/alerts/list#body.ListAlertsResponse.FIELDS.next_page_token) field. |\n| `filter` | `string` Optional. A query string for filtering alert results. For more details, see [Query filters](https://developers.google.com/workspace/admin/alertcenter/guides/query-filters) and [Supported query filter fields](https://developers.google.com/workspace/admin/alertcenter/reference/filter-fields#alerts.list). |\n| `orderBy` | `string` Optional. The sort order of the list results. If not specified results may be returned in arbitrary order. You can sort the results in descending order based on the creation timestamp using `orderBy=\"createTime desc\"`. Currently, supported sorting are `createTime asc`, `createTime desc`, `updateTime desc` |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for an alert listing request.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"alerts\": [ { object (/workspace/admin/alertcenter/reference/rest/v1beta1/alerts#Alert) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `alerts[]` | `object (`[Alert](/workspace/admin/alertcenter/reference/rest/v1beta1/alerts#Alert)`)` The list of alerts. |\n| `nextPageToken` | `string` The token for the next page. If not empty, indicates that there may be more alerts that match the listing request; this value can be used in a subsequent `ListAlertsRequest` to get alerts continuing from last result of the current list call. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/apps.alerts`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]