擷取掛鉤來源
GET /accounts/{account_id}/core/v1/hookSources/{hookSource_id}
在 JSON 回應本文中傳回已儲存的 Hook Source API 資源。
參數
| Name | 類型 | 在 | 必要 | 說明 |
|---|---|---|---|---|
account_id |
字串 |
路徑 |
True |
包含帳戶資源的 ID
|
hookSource_id |
字串 |
路徑 |
True |
要列出的 hookSource 集合的 ID |
回應
Status: 200, Returns the stored Hook Source API resource in the JSON response body.
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
資源的媒體類型。定義的值為:
|
版本 |
字串 |
True |
資源版本。已定義值包括:
|
ID |
字串 |
True |
資源的全域唯一識別碼。定義的值為:
|
姓名 |
字串 |
True |
包含使用者指定資源名稱的 JSON 字串。已定義的值包括:
|
私有 |
字串 |
True |
JSON 字串,指示來源欄位是否會在 API 中公開,還是故意留白。已定義的值包括:
|
預先載入 |
字串 |
True |
指示來源是否已預先載入的 JSON 字串。定義的值包括:
|
sourceType |
字串 |
True |
定義勾點來源類型的 JSON 字串。已定義的值包括:
|
來源 |
字串 |
錯誤 |
包含待執行腳本的 JSON 字串,採用 base64 編碼格式。已定義的值包括:
|
sourceMD5Checksum |
字串 |
True |
JSON 字串包含針對「source」鍵值計算出的 MD5 校驗和。已定義的值包括:
|
描述 |
字串 |
錯誤 |
包含使用者指定的鉤子來源描述的 JSON 字串。已定義的值包括:
|
中繼資料 |
True |
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
|
範例回應
{
"type": "application/astra-hookSource",
"version": "1.0",
"id": "fae6dfbb-ecb8-58ff-a116-6357eb7c956a",
"name": "Payroll script",
"private": "false",
"preloaded": "false",
"sourceType": "script",
"source": "ZWNobyAiVkhKaGJuTWdVbWxuYUhSeklRPT0iIHwgYmFzZTY0IC1k",
"sourceMD5Checksum": "b1a4b8b0144c3f6be553b626130ca145",
"description": "Pre and post hook script for payroll",
"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_update
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
-
遵循 Astra Metadata Schema。如果在建立時未指定,則建立的元資料物件將不帶任何標籤。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
invalidParams
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效查詢參數的名稱 |
原因 |
字串 |
True |
查詢參數無效的原因 |