取得租戶清單
產品版本:10.11
最後修改日期:2024年7月31日
回傳詳細的租戶清單。
終點
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": 2,
"criteria": []}}],
"type": "rpc",
"tid": 1}'
請求欄位
|
領域
|
類型
|
值(們)
|
Description |
|---|---|---|---|
action
|
字串 |
|
所呼叫的動作 |
method
|
字串 |
|
被呼叫的方法 |
data
|
陣列 |
|
篩選參數。請參閱 |
type
|
字串 | rpc |
通訊協定類型 |
tid
|
int | 1 |
交易編號。用於讓客戶端和伺服器雙方識別該請求 |
篩選
|
領域
|
類型
|
Description
|
|---|---|---|
start
|
int | 要回傳的租戶的起始 ID |
count
|
int | 待歸還的租戶人數 |
|
|
字串 |
用於排序的租戶參數. 可選 |
|
|
布林值 |
|
criteria
|
Json | 篩選條件。請參閱下表 |
標準
|
領域 |
類型 |
Description |
|---|---|---|
|
|
字串 |
準則名稱。 ID指租戶 ID |
|
|
字串 |
準則的類型。可能的值: |
|
|
字串 |
某個準則的數值。 |
|
|
|
屬性值。用於 |
回應範例
{
"action": "MultitenancyManagement",
"method": "getTenants",
"tid": "1",
"type": "rpc",
"message": null,
"where": null,
"cause": null,
"data": {
"children": [
{
"id": 2,
"name": "Customer 1",
"uuid": "aaa6da10-97ea-43ac-80f8-6ddd22faeb93",
"allocated": 4,
"allocatedDesired": 4,
"allocatedEc2Instances": 0,
"allocatedEc2InstancesDesired": 0,
"allocatedPhysicalServers": 0,
"allocatedPhysicalServersDesired": 0,
"labels": [
{
"id": 2,
"name": "asdad",
"position": null
}
],
"email": "",
"phone": "",
"website": "",
"address": "",
"logo": "/c/tenants/aaa6da10-97ea-43ac-80f8-6ddd22faeb93/tenant-data/d2071b7b-2bc1-4da5-864d-d4f153323e51.png",
"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
},
{
"id": 3,
"name": "Customer 2",
"uuid": "e956fc69-b978-41d6-97d4-6e8577600434",
"allocated": 5,
"allocatedDesired": 5,
"allocatedEc2Instances": 0,
"allocatedEc2InstancesDesired": 0,
"allocatedPhysicalServers": 0,
"allocatedPhysicalServersDesired": 0,
"labels": [],
"email": "",
"phone": "",
"website": "",
"address": "",
"logo": "/c/tenants/e956fc69-b978-41d6-97d4-6e8577600434/tenant-data/c5f2898a-6cab-4bfb-a107-192c461f7128.png",
"showName": true,
"enabled": false,
"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": 10
}
}
回應欄位
|
領域
|
價值
|
Description
|
|---|---|---|
message
|
字串 | 若請求失敗,請顯示此訊息 |
where
|
字串 | 關於發生問題的方法的說明 |
cause
|
字串 | 故障原因 |
data |
物件 | 包含 children 租戶項目陣列以及 totalCount 欄位。請參閱下方的子表格 |
|
|
陣列 |
租戶. 請參閱以下參數 |
兒童
|
領域
|
價值
|
Description
|
|---|---|---|
|
|
long
|
租戶編號 |
|
|
字串 | 租戶姓名 |
|
|
字串 | 租戶的 UUID |
|
|
int | 為租戶分配的插槽 |
|
|
int | 將於某個時間點分配給租戶的插槽數量。該資料已儲存於資料庫中,但尚未套用至實際租戶。如果 allocatedDesired = actual,則租戶所分配的插槽數量維持不變,或其數量並未發生變化 |
|
|
int | 為該租戶分配的 EC2 執行個體數量 |
|
|
int | 將於某個時間點分配給租戶的 EC2 執行個體數量。該資料已儲存於資料庫中,但尚未套用至實際租戶。若 allocatedEc2InstancesDesired 等於 actual,則表示租戶所分配的 EC2 執行個體數量與此數值相同,或該數量並未發生變化 |
|
|
int |
為該租戶分配的實體伺服器數量 |
|
|
int |
將於某個時間點分配給租戶的實體機器數量。該資料已儲存於資料庫中,但尚未套用至實體租戶 |
|
|
陣列 | 租戶標籤。每個標籤都有 id (long), name (字串) 以及 position (整數) 欄位 |
|
|
整數 |
標籤在清單中的位置 |
|
|
字串 | 租戶的聯絡email |
|
|
字串 | 租戶的聯絡電話號碼 |
|
|
字串 | 租戶網站的網址 |
|
|
字串 | 租戶的聯絡地址 |
|
|
字串 | 租戶標誌圖片的路徑 |
|
|
布林值 | 如果 true,則會顯示租戶的名稱 |
|
|
布林值 | 如果 true,則會啟用該租戶 |
|
|
字串 | 租戶的狀況。可能的值: OK, WARNING, INACCESSIBLE, ERROR |
|
|
字串 | 租戶的狀況。可能的值: NONE, UPDATING |
|
|
字串 | 定義租戶狀態的待處理變更。可能的值:NONE、 CREATE_PENDING, CHANGE_PENDING |
|
|
字串 | 租戶警報的狀態。可能的值: OK, WARNING, ERROR |
|
|
布林值 | true 如果為該租戶設定了共享鎖。 false 否則 |
|
|
布林值 | true 如果為租戶設定了專屬鎖定。 false 否則 |
|
|
布林值 | 表示租戶是否已被編輯 |
|
|
布林值 | 表示租戶狀態是否曾被偵測到一次 |
|
|
int | 來自 0 至 100之間的值。對於新建立的租戶,此值會設定為 0 |
|
|
陣列 | 該租戶的警報數量 |
|
|
int | 租戶使用的虛擬機器數量 |
|
|
int | 租戶使用的插槽數量 |
|
|
int | 租戶使用的 EC2 執行個體數量 |
|
|
int |
租戶使用的實體機器數量 |
|
|
字串 | 警示的錯誤代碼 |
|
|
字串 | 警示標題 |
|
|
字串 | 警報說明 |
|
|
int | 租戶項目數量 |