取得憑證
產品版本: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": "CredentialManagement",
"method": "list",
"data": [{
"filter": {
"start": 0,
"count": 200,
"sort": "USERNAME",
"sortAsc": true,
"criteria": [{
"type": "OR",
"criteria": [{
"name": "USERNAME",
"type": "ILIKE",
"value": "aaa"
}]
}]
}
}],
"type": "rpc",
"tid": 1}'
請求欄位
|
領域
|
類型
|
值(們)
|
|---|---|---|
action
|
字串 |
|
method
|
字串 |
|
data
|
Json |
篩選參數。請參閱 |
type
|
字串 |
|
tid
|
整數 |
|
篩選
|
領域 |
價值 |
Description |
|---|---|---|
|
|
整數 |
要回傳的憑證之起始 ID |
|
|
整數 |
要回傳的憑證數量 |
|
|
字串 |
用於排序的憑證參數 |
|
|
布林值 |
|
|
|
陣列 |
篩選條件。請參閱下方的行 |
type
|
字串 | 準則類型 |
|
|
字串 |
準則名稱。 |
|
|
字串 |
準則的類型。 |
|
|
字串 |
準則的數值 |
回應範例
{
"action": "CredentialManagement",
"method": "list",
"tid": "1",
"type": "rpc",
"message": null,
"where": null,
"cause": null,
"data": [
{
"id": 1,
"type": "PASSWORD",
"username": "administrator",
"password": "$FAKE_PASSWORD$",
"privateKey": null,
"privateKeyFileName": null,
"keyPassword": null,
"description": ""}
]
}
回應欄位
|
領域
|
價值
|
Description
|
|---|---|---|
message
|
字串 | 若請求失敗,請顯示此訊息 |
where
|
字串 | 關於發生問題的方法的說明 |
cause
|
字串 | 故障原因 |
| 資料 | 陣列 | 憑證資訊 |
資料
|
領域
|
價值
|
Description
|
|---|---|---|
|
|
int | 憑證識別碼 |
type
|
字串 | 憑證類型。可能的值: PASSWORD 或 PRIVATE_KEY |
username
|
字串 | 使用者名稱 |
password
|
字串 | 密碼(經過混淆處理) |
privateKey
|
字串 | 私鑰 |
privateKeyFileName
|
字串 | 私鑰檔案名稱 |
keyPassword
|
字串 | 私鑰密碼(已進行混淆處理) |
description
|
字串 | Description |