列出所有訂閱
GET /accounts/{account_id}/core/v1/subscriptions
傳回集合中所有符合資源的 JSON 陣列。如果在請求中指定了個別欄位,則項目 JSON 陣列將按指定順序包含每個相符資源所請求的欄位。
參數
| Name | 類型 | 在 | 必要 | 說明 |
|---|---|---|---|---|
account_id |
字串 |
路徑 |
True |
包含帳戶資源的 ID
|
繼續 |
查詢 |
錯誤 |
指示要從哪個權杖繼續列出。 URL 範例:「continue= OpenAPI 範例:" |
|
數 |
字串 |
查詢 |
錯誤 |
指出中繼資料物件是否應傳回資源總數。 URL 範例:「count=true」 OpenAPI 範例:"true" |
篩選器 |
字串 |
查詢 |
錯誤 |
指示在列出集合時,為了傳回資源而應符合哪些欄位。 支援的運算子包括:
URL 範例:「filter=field%20eq%20%27value%27」 OpenAPI 範例:"field eq 'value'" |
包括 |
字串 |
查詢 |
錯誤 |
指示列出集合時應傳回哪些欄位。 URL 範例:「include=id」、「include=id,name」 OpenAPI 範例:"id" |
限制 |
字串 |
查詢 |
錯誤 |
表示列出集合時要傳回的資源數量上限。 URL 範例:「limit=2」 OpenAPI 範例:「2」 |
訂單者 |
字串 |
查詢 |
錯誤 |
指示列出集合時資源的排序順序。 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[任何: "subscription_1.2_get_response_body"、array[]] |
True |
|
中繼資料 |
True |
範例回應
{
"type": "application/astra-subscriptions",
"version": "1.2",
"items": [
{
"type": "application/astra-subscription",
"version": "1.1",
"id": "d4c865c9-64a7-4661-ae4a-3307dffcd3da",
"customerProfileID": "2157047189",
"paymentProfileID": "E7CEB0A9F1BECA32A02493E1B31D5955",
"paymentExpiry": "2022-02-01T00:00:00Z",
"purchaseOrderNumber": "72384632",
"marketplace": "netapp",
"licenseSN": "278343",
"terms": "trial",
"status": "inactive",
"appLimit": 0,
"namespaceLimit": 10,
"subscriptionPeriod": 90,
"gracePeriod": 7,
"reminderBeforePeriod": 30,
"onboardStatus": "success",
"costPerAppUnit": 0,
"costPerNamespaceUnit": 0.005,
"metadata": {
"labels": [],
"creationTimestamp": "2020-05-06T12:24:52.256624Z",
"modificationTimestamp": "2020-05-06T12:24:52.256624Z",
"createdBy": "11c0cfa1-4f27-4ef7-a21c-cb452fc5c9aa"
}
},
{
"type": "application/astra-subscription",
"version": "1.1",
"id": "4c43ed8b-078f-4fe3-b8c6-5d515f6382e6",
"customerProfileID": "2157047189",
"paymentProfileID": "E7CEB0A9F1BECA32A02493E1B31D5955",
"paymentExpiry": "2022-05-01T00:00:00Z",
"purchaseOrderNumber": "92374658",
"marketplace": "netapp",
"licenseSN": "374623",
"terms": "paid",
"status": "active",
"appLimit": 0,
"namespaceLimit": -1,
"subscriptionPeriod": -1,
"gracePeriod": -1,
"reminderBeforePeriod": -1,
"onboardStatus": "success",
"costPerAppUnit": 0,
"costPerNamespaceUnit": 0.005,
"metadata": {
"labels": [],
"creationTimestamp": "2020-08-06T12:24:52.256624Z",
"modificationTimestamp": "2020-08-06T12:24:52.256624Z",
"createdBy": "11c0cfa1-4f27-4ef7-a21c-cb452fc5c9aa"
}
}
],
"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 |
字串 |
錯誤 |
subscription_1.2_get_response_body
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
資源的媒體類型。定義的值為:
|
版本 |
字串 |
True |
資源版本。定義的值為:
|
ID |
字串 |
True |
資源的全域唯一識別碼。定義的值為:
|
customerProfileID |
字串 |
True |
包含客戶資料 ID 的 JSON 字串 "Authorize.net"(由 UI 呼叫)在試用期內未設定。如果未設定,則在讀取操作期間傳回空字串。定義的值為:
|
paymentProfileID |
字串 |
錯誤 |
包含由使用者介面呼叫的 "Authorize.net"支付設定檔 ID 的 JSON 字串,未設定為試用期。如果未設定,則在讀取操作期間傳回空字串。定義的值為:
|
paymentExpiry |
字串 |
錯誤 |
包含時間戳記的 JSON 字串,指示付款方式的到期時間。此資訊來自 authorize.net](http://authorize.net,並由使用者介面設定。定義的值為:
|
purchaseOrderNumber |
字串 |
錯誤 |
包含付款方式採購訂單號碼的 JSON 字串。定義的值為:
|
市集 |
字串 |
錯誤 |
JSON 字串,用於指示帳戶的市場,付款資訊將在該市場上記錄。定義值:
|
licenseSN |
字串 |
錯誤 |
包含付款方式授權序號的 JSON 字串。定義的值為:
|
條款 |
字串 |
True |
表示帳戶目前層級的 JSON 字串。定義的值為:
|
狀態 |
字串 |
True |
表示訂閱目前狀態的 JSON 字串。定義的值為:
|
appLimit |
數字 |
True |
JSON 數字表示此訂閱的應用程式限制。值為 -1 表示無限制。 |
namespaceLimit |
數字 |
True |
JSON 數字表示此訂閱的命名空間限制。值為 -1 表示無限制。 |
subscriptionPeriod |
數字 |
True |
JSON 數值,表示訂閱週期。值為 -1 表示無限制。單位:天 |
gracePeriod |
數字 |
True |
JSON 數值,表示試用訂閱到期或付費訂閱取消後的寬限期。單位:天 |
reminderBeforePeriod |
數字 |
True |
JSON 數字,表示試用訂閱結束前幾天開始向客戶發送通知。該值以天為單位,值為 -1 表示不適用。 |
onboardStatus |
字串 |
True |
指示客戶註冊目前狀態的 JSON 字串。有效值為 "not started"、"in progress"、"success"、"failed"。定義的值為:
|
costPerAppUnit |
數字 |
True |
JSON 數字表示每個應用程式單元的成本。試用版的值為 0。單位:美元 |
costPerNamespaceUnit |
數字 |
True |
JSON 數字,表示每個命名空間單位的成本。試用版的值為 0。單位:美元 |
中繼資料 |
True |
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
|
type_astra_metadata_list
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
繼續 |
字串 |
錯誤 |
|
數 |
數字 |
錯誤 |
|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
invalidParams
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效查詢參數的名稱 |
原因 |
字串 |
True |
查詢參數無效的原因 |