查询指定项目下所有ApiKey及其详细信息。
接口说明
请求说明
通过
allowedStore参数可以过滤返回的 ApiKey,只返回允许写入指定 LogStore 或 MetricStore 的 ApiKey。如果不提供
allowedStore参数,则返回项目下的所有 ApiKey。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 |
ApiKey 名称 |
demo-apikey-001 |
| apiKey |
string |
ApiKey 明文 |
|
| status |
string |
状态 |
Enabled |
| description |
string |
描述 |
test |
| allowedStores |
array |
允许写入的 LogStore 列表 |
|
|
string |
LogStore 名称 |
test |
|
| createTime |
integer |
创建时间 |
1788420000 |
| updateTime |
integer |
更新时间 |
1788420000 |
| count |
integer |
当前页 ApiKey 数量 |
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
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。