检索通知
GET /accounts/{account_id}/core/v1/notifications/{notification_id}
返回 JSON 响应正文中存储的 Notification API 资源。
参数
| 名称 | Type | 在 | Required | Description |
|---|---|---|---|---|
account_id |
string |
path |
True |
包含帐户资源的 ID
|
notification_id |
string |
path |
True |
要列出的通知集合的 ID |
响应
Status: 200, Returns the stored Notification API resource in the JSON 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": "application/astra-notification",
"version": "1.3",
"id": "03c645d6-75f0-59b0-95f2-862ae344ea27",
"name": "astra.app.discovery.failed",
"sequenceCount": 48923,
"summary": "Application Discovery Failed",
"eventTime": "2020-08-06T12:24:51.846543Z",
"source": "composite-compute",
"resourceID": "f670bf11-8850-44bd-b330-815af6186a06",
"additionalResourceIDs": [
"84dfee99-b7b2-46d2-9021-0a1a9a5df1d6",
"abb32003-07b9-49b1-9938-1cf6d2f33566"
],
"resourceType": "application/astra-app",
"correlationID": "3c603442-cfca-4af9-9f1b-40dde5c7a806",
"severity": "warning",
"class": "user",
"description": "Discovering the application 'mysql' was unsuccessful. K8s error 442. Application marked in state 'error'.",
"destinations": [
"notification"
],
"resourceURI": "/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/topology/v1/managedClusters/dfd9de2d-6f0b-437b-a737-c8f7f176cd14/apps/f670bf11-8850-44bd-b330-815af6186a06",
"resourceCollectionURL": [
"https://www.astra.io/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/topology/v1/clouds/0df3f1a0-7203-4c12-aabf-a7bee6302671/clusters/dfd9de2d-6f0b-437b-a737-c8f7f176cd14/namespaces/f8b58091-4b9c-4c64-9b40-018dbaf7c5de/apps/f670bf11-8850-44bd-b330-815af6186a06",
"https://www.astra.io/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/topology/v1/clouds/0df3f1a0-7203-4c12-aabf-a7bee6302671/clusters/dfd9de2d-6f0b-437b-a737-c8f7f176cd14/namespaces/923708f8-0435-45b5-8c00-fbdef3ffaf25/apps/f670bf11-8850-44bd-b330-815af6186a06"
],
"userID": "abda967f-cd2c-4237-908e-99266648c553",
"accountID": "f126d214-bccf-4558-86b4-2137a41e734f",
"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 |
invalidParams
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效查询参数的名称 |
原因 |
string |
True |
查询参数无效的原因 |