列出所有設定
GET /accounts/{account_id}/core/v1/settings
傳回集合中所有符合資源的 JSON 陣列。如果在請求中指定了個別欄位,則項目 JSON 陣列將按指定順序包含每個相符資源所請求的欄位。
參數
| Name | 類型 | 在 | 必要 | 說明 |
|---|---|---|---|---|
account_id |
字串 |
路徑 |
True |
包含帳戶資源的 ID
|
包括 |
字串 |
查詢 |
錯誤 |
指示列出集合時應傳回哪些欄位。 URL 範例:「include=id」、「include=id,name」 OpenAPI 範例:"id" |
限制 |
字串 |
查詢 |
錯誤 |
表示列出集合時要傳回的資源數量上限。 URL 範例:「limit=2」 OpenAPI 範例:「2」 |
篩選器 |
字串 |
查詢 |
錯誤 |
指示在列出集合時,為了傳回資源而應符合哪些欄位。 支援的運算子包括:
URL 範例:「filter=field%20eq%20%27value%27」 OpenAPI 範例:"field eq 'value'" |
數 |
字串 |
查詢 |
錯誤 |
指出中繼資料物件是否應傳回資源總數。 URL 範例:「count=true」 OpenAPI 範例:"true" |
訂單者 |
字串 |
查詢 |
錯誤 |
指示列出集合時資源的排序順序。 URL 範例:「orderBy=name」、「orderBy=name%20desc」 OpenAPI 範例:"name desc" |
跳過 |
字串 |
查詢 |
錯誤 |
表示列出集合時要跳過的資源數量。 URL 範例:「skip=1」 OpenAPI 範例:「1」 |
回應
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.
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
項目 |
array[任何: "setting_1.1_get_response_body"、array[]] |
True |
|
中繼資料 |
True |
範例回應
{
"type": "application/astra-settings",
"version": "1.1",
"items": [
{
"type": "application/astra-setting",
"version": "1.0",
"id": "5da0a2ed-c51d-4d91-8b98-ed3aa8a88cc5",
"name": "astra.account.smtp",
"currentConfig": {
"credential": "",
"isEnabled": "false",
"port": 587,
"relayServer": "smtp.sendgrid.net"
},
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "astra.account.smtp",
"type": "object",
"properties": {
"credential": {
"type": "string",
"description": "The credential ID for SMTP authentication."
},
"isEnabled": {
"type": "string",
"description": "This property determines if this setting is enabled or not."
},
"port": {
"type": "integer",
"description": "The SMTP port. For an unencrypted or a TLS connection, use port 25, 2525, or 587."
},
"relayServer": {
"type": "string",
"description": "This setting is sometimes referred to as the external SMTP server or the SMTP relay."
}
},
"additionalProperties": false,
"required": [
"relayServer",
"port",
"isEnabled"
]
},
"state": "valid",
"stateUnready": [],
"metadata": {
"labels": [],
"creationTimestamp": "2021-06-04T20:14:52Z",
"modificationTimestamp": "2021-06-04T20:14:52Z",
"createdBy": "c9550bbb-e70b-4578-8504-07397f875bcb",
"modifiedBy": "65e1571b-1b46-4f05-95b0-7d7f5a93da6a"
}
}
],
"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: 503, Service unavailable
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/41",
"title": "Service not ready",
"detail": "Currently, the service can't respond to this request.",
"status": "503"
}
錯誤
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_json
包含鍵值對的 JSON 物件,這些鍵值對構成此設定的目前組態。此物件的內容必須符合 configSchema 欄位中包含的 JSON Schema。預設值由 configmap 提供。使用者變更預設值後,這些預設值不會被覆寫。
type_json
包含鍵值對的 JSON 物件,用於指定此設定的配置。該物件的內容必須符合 configSchema 欄位中包含的 JSON 模式。該物件在指定之前不存在。指定後,功能服務會通知對應的服務請求套用所需的設定。相應的服務隨後可以執行驗證並將所需的配置套用到目前配置。
屬性
type_json_schema
此 JSON 物件包含此資源中 config 屬性的 JSON 模式。必須符合 JSON Schema Draft 7。如果資源中存在 config 值,則必須根據指定的 configSchema 進行驗證。通常建議在適當的情況下,配置項中包含一個 "isEnabled" 欄位。"isEnabled" 欄位包含一個值,指示設定是啟用("true")還是停用("false")。
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
$schema |
字串 |
True |
|
類型 |
字串 |
True |
|
屬性 |
True |
||
additionalProperties |
布林值 |
True |
|
必要 |
陣列[string] |
True |
type_astra_label
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
|
值 |
字串 |
True |
type_astra_metadata_update
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
-
符合 Astra Metadata Schema。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
setting_1.1_get_response_body
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
資源的媒體類型。定義的值為:
|
版本 |
字串 |
True |
資源版本。定義的值為:
|
ID |
字串 |
True |
資源的全域唯一識別碼。定義的值為:
|
姓名 |
字串 |
True |
包含設定名稱的 JSON 字串,採用分層點號表示法(.)。定義的值為:
|
currentConfig |
True |
包含鍵值對的 JSON 物件,這些鍵值對構成此設定的目前組態。此物件的內容必須符合 configSchema 欄位中包含的 JSON Schema。預設值由 configmap 提供。使用者變更預設值後,這些預設值不會被覆寫。 |
|
desiredConfig |
錯誤 |
包含鍵值對的 JSON 物件,用於指定此設定的配置。該物件的內容必須符合 configSchema 欄位中包含的 JSON 模式。該物件在指定之前不存在。指定後,功能服務會通知對應的服務請求套用所需的設定。相應的服務隨後可以執行驗證並將所需的配置套用到目前配置。 |
|
configSchema |
True |
此 JSON 物件包含此資源中 config 屬性的 JSON 模式。必須符合 JSON Schema Draft 7。如果資源中存在 config 值,則必須根據指定的 configSchema 進行驗證。通常建議在適當的情況下,配置項中包含一個 "isEnabled" 欄位。"isEnabled" 欄位包含一個值,指示設定是啟用("true")還是停用("false")。 |
|
狀態 |
字串 |
True |
包含指示應用程式運作狀態的值的 JSON 字串。定義的值為:
|
stateUnready |
陣列[string] |
True |
JSON 字串的 JSON 陣列,每個字串表示設定未成功套用的原因。定義的值為:
|
中繼資料 |
True |
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
|
type_astra_metadata_list
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
繼續 |
字串 |
錯誤 |
|
數 |
數字 |
錯誤 |
|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
invalidParams
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效查詢參數的名稱 |
原因 |
字串 |
True |
查詢參數無效的原因 |