取得租戶資訊
產品版本:10.11
最後修改日期:2024年7月31日
回傳詳細的租戶資訊。
此請求使用 getTenants 方法,與 取得租戶清單,並附帶一個篩選器,該篩選器會根據 ID 返回一位租戶(條件 ID、類型 EQ)。
終點
https://<Director_IP_address>:4443/c/router
請求範例
curl --request POST \
--url https://<Director_IP_address>:4443/c/router \
--header "content-type: application/json" \
--cookie cookies.txt \
--data '{
"action": "MultitenancyManagement",
"method": "getTenants",
"data": [{
"filter":{
"start": 0,
"count": 1000,
"criteria": [{
"name": "ID",
"type": "EQ",
"value": "1"}]}
}],
"type": "rpc",
"tid":1}'
請求欄位
|
領域
|
類型
|
值(們)
|
Description |
|---|---|---|---|
action
|
字串 | MultitenancyManagement |
所呼叫的動作 |
method
|
字串 | getTenants |
被呼叫的方法 |
data
|
陣列 | [{"filter": {...}}]
|
篩選參數。請參閱下方的篩選表 |
type
|
字串 | rpc
|
通訊協定類型 |
tid
|
int | 1 |
交易編號。用於讓客戶端和伺服器雙方識別該請求 |
篩選
|
領域
|
類型
|
Description
|
|---|---|---|
|
|
int | 要回傳的租戶的起始 ID |
|
|
int | 待歸還的租戶人數 |
|
|
字串 |
用於排序的租戶參數 |
|
|
布林值 |
|
|
|
Json | 篩選條件。請參閱下表 |
標準
|
領域 |
類型 |
Description |
|---|---|---|
|
|
字串 | 準則名稱。 ID 意指租戶 ID |
|
|
字串 | 準則的類型。可能的值: AND, OR, EQ (相等), NEQ (不等於), LIKE (區分大小寫),IN, BETWEEN, NOT_NULL, ILIKE, GT, GTE, LT, LTE |
|
|
字串 | 某個準則的數值。 1 : 租戶 ID=1 |
values
|
list <string>
|
屬性值。用於 IN, BETWEEN 該 type 欄位的 |
回應範例
{
"action": "MultitenancyManagement",
"method": "getTenants",
"tid": "1",
"type": "rpc",
"message": null,
"where": null,
"cause": null,
"data": {
"children": [
{
"id": 1,
"name": "test name",
"uuid": "3a16f608-2a2a-4fe7-94b5-91068725bced",
"allocated": 3,
"allocatedDesired": 3,
"allocatedEc2Instances": 0,
"allocatedEc2InstancesDesired": 0,
"allocatedPhysicalServers": 0,
"allocatedPhysicalServersDesired": 0,
"allocatedPhysicalWorkstations": 0,
"allocatedPhysicalWorkstationsDesired": 0,
"allocatedOracleDatabases": 0,
"allocatedOracleDatabasesDesired": 0,
"allocatedBackupStorage": 0,
"labels": [],
"email": "email@email.com",
"phone": "12345",
"website": "www.nakivo.com",
"address": "Some address",
"logo": null,
"showName": true,
"enabled": true,
"state": "OK",
"status": "NONE",
"changeStatus": "NONE",
"alarmState": "OK",
"lockedShared": false,
"lockedExclusive": false,
"wasEdited": false,
"wasDiscoveredOnce": true,
"progress": 0,
"alarmCounters": [0, 0, 0, 0],
"usedVms": 0,
"usedSockets": 0,
"usedEc2Instances": 0,
"usedPhysicalServers": 0,
"alertErrorCode": null,
"alertTitle": null,
"alertDescription": null
}
],
"totalCount": 1
}
}
回應欄位
|
領域
|
價值
|
Description
|
|---|---|---|
message
|
字串 | 若請求失敗,請顯示此訊息 |
where
|
字串 | 關於發生問題的方法的說明 |
cause
|
字串 | 故障原因 |
data |
物件 | 包含 children 租戶項目陣列以及 totalCount 欄位。請參閱下方的子表格 |
|
|
陣列 |
租戶資料。請參閱以下參數 |
兒童
|
領域
|
價值
|
Description
|
|---|---|---|
|
|
long
|
租戶編號 |
|
|
字串 | 租戶姓名 |
|
|
字串 | 對應會話的 UUid |
|
|
int | 為租戶分配的插槽 |
|
|
int | 將於某個時間點分配給租戶的插槽數量。該資料已儲存於資料庫中,但尚未套用至實體租戶 |
|
|
int | 為該租戶分配的 EC2 執行個體數量 |
|
|
int | 將於某個時間點分配給租戶的 EC2 執行個體數量。該資料已儲存於資料庫中,但尚未套用至實體租戶 |
|
|
int |
已分配的實體伺服器數量 |
|
|
int |
將於某個時間點分配給租戶的實體機器數量。該資料已儲存於資料庫中,但尚未套用至實體租戶 |
|
|
int |
分配給租戶的實體工作站授權數量 |
|
|
int |
將於某個時間點分配給租戶的實體工作站授權數量。該資料已儲存於資料庫中,但尚未套用至實體租戶 |
|
|
int |
分配給租戶的 Oracle 資料庫授權數量 |
|
|
int |
將於某個時間點分配給租戶的 Oracle 資料庫授權數量。該資料已儲存於資料庫中,但尚未套用至實體租戶 |
|
|
int |
分配給租戶的備份儲存空間容量 |
|
|
陣列 | 租戶標籤 |
|
|
字串 |
租戶的聯絡email |
|
|
字串 |
租戶的聯絡電話號碼 |
|
|
字串 |
租戶網站的網址 |
|
|
字串 |
租戶的聯絡地址 |
|
|
字串 |
租戶標誌圖片的路徑 |
|
|
布林值 |
若為真,則會顯示租戶的名稱 |
|
|
布林值 |
若為真,則會啟用該租戶 |
|
|
字串 |
租戶的狀況。可能的值: |
|
|
字串 |
租戶的狀況。可能的值: |
|
|
字串 |
定義租戶狀態的待處理變更。可能的值: |
|
|
字串 |
租戶警報系統的現況。可能的值: |
|
|
布林值 |
若租戶已設定共用鎖,則為true。否則為false |
|
|
布林值 |
|
|
|
布林值 |
表示租戶是否已被編輯 |
|
|
布林值 |
表示是否曾偵測到租戶的狀態一次 |
|
|
int |
來自 |
|
|
陣列 |
該租戶的警報數量 |
|
|
int |
租戶使用的虛擬機器數量 |
|
|
int |
租戶使用的插槽數量 |
|
|
int |
租戶使用的 EC2 執行個體數量 |
|
|
int |
租戶使用的實體機器數量 |
|
|
字串 |
該警示的錯誤代碼 |
|
|
字串 |
警示的標題 |
|
|
字串 |
警報說明 |
|
|
int |
租戶項目數量 |