查詢指定專案下所有 API Key 及其詳細資訊。
介面說明
請求說明
透過
allowedStore參數可以過濾傳回的 API Key,只傳回允許寫入指定 LogStore 或 MetricStore 的 API Key。如果不提供
allowedStore參數,則傳回專案下的所有 API Key。log:ListApiKeys權限被視為敏感權限,應謹慎授予。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求文法
GET /apikeys HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| allowedStore |
string |
否 |
允許寫入的 LogStore。 |
test |
| size |
integer |
否 |
步長。 |
10 |
| offset |
integer |
否 |
頁碼。 |
1 |
| project |
string |
否 |
Project 名稱。 |
test |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
回應資料。 |
||
| apiKeys |
array<object> |
API Key 清單。 |
|
|
object |
API Key 資訊。 |
||
| apiKeyName |
string |
API Key 名稱。 |
demo-apikey-001 |
| apiKey |
string |
API Key 明文。 |
|
| status |
string |
狀態。 |
Enabled |
| description |
string |
描述。 |
test |
| allowedStores |
array |
允許寫入的 LogStore 清單。 |
|
|
string |
LogStore 名稱。 |
test |
|
| createTime |
integer |
建立時間。 |
1788420000 |
| updateTime |
integer |
更新時間。 |
1788420000 |
| count |
integer |
目前頁 API Key 數量。 |
10 |
| total |
integer |
總數。 |
20 |
樣本
正常返回樣本
JSON格式
{
"apiKeys": [
{
"apiKeyName": "demo-apikey-001",
"apiKey": "",
"status": "Enabled",
"description": "test",
"allowedStores": [
"test"
],
"createTime": 1788420000,
"updateTime": 1788420000
}
],
"count": 10,
"total": 20
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。