Skip to main content
Astra Automation
此產品有較新版本可以使用。
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

擷取未讀通知

GET /accounts/{account_id}/core/v1/users/{user_id}/unreadNotifications/{unreadNotification_id}

在 JSON 回應本文中傳回已儲存的未讀通知 API 資源。

參數

Name 類型 必要 說明

account_id

字串

路徑

True

包含帳戶資源的 ID

  • 範例:{{.Account}}

user_id

字串

路徑

True

包含使用者資源的 ID

未讀通知_id

字串

路徑

True

要列出的 unreadNotification 集合的 ID

回應

Status: 200, Returns the stored Unread Notification API resource in the JSON response body.
Name 類型 必要 說明

類型

字串

True

資源的媒體類型。定義的值為:

  • "應用程式/astra-unreadNotification"

版本

字串

True

資源版本。定義的值為:

  • "1.0"

ID

字串

True

資源的全域唯一識別碼。定義的值為:

  • 符合 UUIDv4 架構

notificationID

字串

True

包含通知 ID 的 JSON 字串,該 ID 將被建立標記的使用者標記為已讀取。定義的值為:

  • 符合 Astra 識別符架構

sequenceCount

數字

True

JSON 數字,包含與通知 ID 所指定通知相關聯的序列計數。

嚴重性

字串

True

包含以下值之一的 JSON 字串,用於指示事件的嚴重程度。定義的值為:

  • 「已清除」- 表示先前報告的描述某種狀況的事件已不再處於活動狀態。嚴重等級為「已清除」的事件將使用相同的摘要和關聯 ID,以便進行配對。

  • 「不確定」—表示無法確定嚴重程度

  • 「informational」- 表示狀態發生了預期且正常的改變(未在 X.733 中定義)

  • 「警告」- 表示在感受到任何重大影響之前,已偵測到可能或即將發生的、影響服務的故障

  • 「critical」- 表示已發生影響服務的情況,需要立即採取修正措施

中繼資料

"type_astra_metadata"

True

與資源相關聯的用戶端和服務指定中繼資料。定義的值為:

  • 符合 Astra 中繼資料架構

範例回應
{
  "type": "application/astra-unreadNotification",
  "version": "1.0",
  "id": "10df997b-629e-50f8-bc5f-a18b9a4ac5f6",
  "notificationID": "4080cf5f-2261-4130-b8fb-8432e2e553e6",
  "sequenceCount": 48923,
  "severity": "warning",
  "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
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

範例回應
{
  "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
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

invalidParams

陣列["invalidParams"]

錯誤

無效查詢參數清單

範例回應
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

回應

Status: 403, Forbidden
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

範例回應
{
  "type": "https://astra.netapp.io/problems/11",
  "title": "Operation not permitted",
  "detail": "The requested operation isn't permitted.",
  "status": "403"
}

錯誤

Status: 404, Not found
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

範例錯誤回應
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

定義

請參閱定義

type_astra_label

Name 類型 必要 說明

姓名

字串

True

字串

True

type_astra_metadata

與資源相關聯的用戶端和服務指定中繼資料。定義的值為:

  • 符合 Astra 中繼資料架構

Name 類型 必要 說明

標籤

陣列["type_astra_label"]

True

建立時間戳記

字串

True

修改時間戳記

字串

True

建立者

字串

True

modifiedBy

字串

錯誤

invalidParams

Name 類型 必要 說明

姓名

字串

True

無效查詢參數的名稱

原因

字串

True

查詢參數無效的原因