列出所有通知
GET /accounts/{account_id}/core/v1/notifications
返回集合中所有匹配资源的 JSON 数组。如果在请求中指定了单个字段,则项目 JSON 数组将包含按指定顺序为每个匹配资源请求的字段。
参数
| 名称 | Type | 在 | Required | Description |
|---|---|---|---|---|
account_id |
string |
path |
True |
包含帐户资源的 ID
|
包括 |
string |
查询 |
False |
指示列出集合时应返回哪些字段。 URL 示例:"include=id"、"include=id,name" OpenAPI 示例:"id"
|
limit |
string |
查询 |
False |
指示列出集合时要返回的最大资源数。 URL 示例:"limit=2" OpenAPI 示例:"2"
|
筛选器 |
string |
查询 |
False |
指示在列出集合时应匹配哪些字段以返回资源。 支持的运算符有:
URL 示例:"filter=field%20eq%20%27value%27" OpenAPI 示例:"field eq 'value'" |
订单 |
string |
查询 |
False |
指示列出集合时资源的排序顺序。 URL 示例:"orderBy=name","orderBy=name%20desc" OpenAPI 示例:"name desc" |
跳过 |
string |
查询 |
False |
指示列出集合时要跳过的资源数。 URL 示例:"skip=1" OpenAPI 示例:"1" |
count |
string |
查询 |
False |
指示是否应在元数据对象中返回资源总数。 URL 示例:"count=true" OpenAPI 示例:"true"
|
继续 |
查询 |
False |
指示要从中恢复列表的令牌。 URL 示例:"continue= OpenAPI 示例:" |
响应
Status: 200, Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.
| 名称 | Type | Required | Description |
|---|---|---|---|
个项 |
数组[任意类型:"notification_1.3_get_response_body",数组[]] |
True |
|
元数据 |
True |
响应示例
{
"type": "application/astra-notifications",
"version": "1.3",
"items": [
[
"4f8273ee-883d-47f0-a512-9e27b6285f20",
"Discovering Applications in Cluster"
],
[
"1cdd26dc-5eb0-4cf4-a0c1-39a9b83720e1",
"Application Discovered"
],
[
"275a8c6f-ebf6-4d10-b671-77d1b8c7c0a6",
"Application Discovery Failed"
],
[
"4325f971-ca9c-4a52-bc9a-da6ec62e6bfe",
"Application Discovered"
]
],
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
响应
Status: 401, Unauthorized
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
响应
Status: 400, Bad request
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
|
invalidParams |
数组["invalidParams"] |
False |
无效查询参数列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
响应
Status: 403, Forbidden
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
错误
Status: 404, Not found
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
错误响应示例
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
定义
查看定义
数据
包含其他事件特定信息的 JSON 对象。
| 名称 | Type | Required | Description |
|---|---|---|---|
ttl |
数字 |
False |
JSON 数字,表示事件将被保留的秒数(自 eventTime 以来)。只有在指定的秒数后自动删除事件时,才会包含此字段。删除时,如果事件具有通知目标,则所有关联的通知也会被删除。删除时,如果事件具有横幅目标,则横幅也会被删除。缺少此字段(或值为"0")意味着事件不会被自动删除。 |
isAcknowledgeable |
string |
False |
JSON 字符串,指示横幅是否可关闭。定义的值为:
|
类型 Astra 标签
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
|
value |
string |
True |
type_astra_metadata
与资源关联的客户端和服务指定的元数据。定义的值为:
-
符合 Astra 元数据架构
| 名称 | Type | Required | Description |
|---|---|---|---|
labels |
数组["类型 Astra 标签"] |
True |
|
creationTimestamp |
string |
True |
|
modificationTimestamp |
string |
True |
|
已创建 |
string |
True |
|
modifiedBy |
string |
False |
notification_1.3_get_response_body
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
资源的媒体类型。定义的值为:
|
version |
string |
True |
资源的版本。定义的值为:
|
id |
string |
True |
资源的全局唯一标识符。定义的值为:
|
name |
string |
True |
包含事件的点符号(.)层次结构名称的 JSON 字符串。定义的值为:
|
sequenceCount |
数字 |
True |
包含序列计数的 JSON 编号。每次接收到新事件时,系统都会递增该数字。 |
摘要 |
string |
True |
包含事件的短格式(少于 40 个字符)摘要的 JSON 字符串。定义的值为:
|
eventTime |
string |
True |
包含指示事件发生时间的时间戳的 JSON 字符串。定义的值为:
|
源 |
string |
True |
包含生成事件的服务的小写名称的 JSON 字符串。定义的值为:
|
resourceID |
string |
True |
包含与事件关联的资源 ID 的 JSON 字符串。定义的值为:
|
additionalResourceIDs |
数组[string] |
True |
JSON 字符串的 JSON 数组,每个数组都包含与事件关联的其他资源的资源 ID。虽然 "resourceID" 字段包含与此事件关联的主要资源,但此字段包含与相同事件关联的任何数量的其他资源 ID。如果没有与事件关联的其他资源,则数组将为空。定义的值为:
|
resourceType |
string |
True |
包含与事件关联的资源的媒体类型的 JSON 字符串。定义的值为:
|
correlationID |
string |
True |
包含允许将相关事件分组在一起的 UUIDv4 相关 ID 的 JSON 字符串。定义的值为:
|
severity |
string |
True |
包含指示事件严重性的以下值之一的 JSON 字符串。定义的值为:
|
类 |
string |
True |
包含指示事件类的以下值之一的 JSON 字符串。定义的值为:
|
description |
string |
True |
JSON 字符串包含有关此事件的长格式描述性文本。定义的值为:
|
描述 URL |
string |
False |
包含启用横幅中的按钮并将其链接到外部文档的 URL 的 JSON 字符串。定义的值为:
|
correctiveAction |
string |
False |
JSON 字符串包含有关应采取哪些纠正措施以响应事件的长格式描述性文本。定义的值为:
|
correctiveActionURL |
string |
False |
包含将横幅中的按钮链接到 UI 中的页面以解决此问题的 URL 的 JSON 字符串。定义的值为:
|
可见性 |
数组[string] |
False |
JSON 字符串的 JSON 数组,每个表示允许查看事件的 RBAC 角色。角色通过 OR 一起定义。可选。如果省略,则具有任何 RBAC 角色的用户都可以查看事件。定义的值为:
|
目标 |
数组[string] |
False |
JSON 字符串的 JSON 数组,每个指示事件的附加目标。这些允许服务提供有关必须将事件路由到何处的提示,除了 Activity 服务的活动日志之外。可选。定义的值为:
|
资源 URI |
string |
False |
包含与事件关联的 URI 的 JSON 字符串。仅包含与 API 操作相关的事件。定义的值为:
|
resourceCollectionURL |
数组[string] |
False |
JSON 字符串的 JSON 数组,每个字符串指示与事件关联的资源的完全扩展访问 URL。定义的值为:
|
resourceMethod |
string |
False |
包含已调用 HTTP 方法的 JSON 字符串。仅包括与 API 操作相关的事件。定义的值为:
|
resourceMethodResult |
string |
False |
包含调用 HTTP 方法的结果的 JSON 字符串。仅包含与 API 操作相关的事件。定义的值为:
|
用户 ID |
string |
False |
包含与事件关联的用户 ID 的 JSON 字符串。仅包含与用户启动的操作关联的事件。定义的值为:
|
accountID |
string |
False |
包含与事件关联的帐户 ID 的 JSON 字符串。仅包含与帐户关联的事件。定义的值为:
|
数据 |
False |
包含其他事件特定信息的 JSON 对象。 |
|
元数据 |
True |
与资源关联的客户端和服务指定的元数据。定义的值为:
|
type_astra_metadata_list
| 名称 | Type | Required | Description |
|---|---|---|---|
继续 |
string |
False |
|
count |
数字 |
False |
|
labels |
数组["类型 Astra 标签"] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
已创建 |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效查询参数的名称 |
原因 |
string |
True |
查询参数无效的原因 |