> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出 API 密钥

> 返回团队的 API 密钥 —— 只有元数据，永远不含密钥值

```
GET /openapi/admin/api/v1/api-keys
```

列出团队的 API 密钥。如果调用方只拥有"仅限自己"范围的读取权限，则只能看到自己创建的密钥。读取类接口永远不会返回密钥值，只返回一段用于展示的前缀。

<Note>
  **所需权限：** `service_account:read`
</Note>

### 查询参数

<ParamField query="page_size" type="integer" default="20">
  每页条数（1–100）
</ParamField>

<ParamField query="continuation_token" type="string">
  上一页返回的令牌。内容不透明 —— 请不要自行构造或解析。
</ParamField>

<ParamField query="name_fuzzy" type="string">
  按密钥名称做子串匹配，不区分大小写
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://app.memorylake.cn/openapi/admin/api/v1/api-keys?page_size=20' \
    -H 'Authorization: Bearer sk-admin-xxxxxx'
  ```
</RequestExample>

### 响应

<ResponseField name="data" type="object">
  <Expandable title="分页的密钥列表">
    <ResponseField name="items" type="array">
      <Expandable title="API 密钥对象">
        <ResponseField name="id" type="string">稳定的密钥标识符</ResponseField>
        <ResponseField name="name" type="string">显示名称</ResponseField>
        <ResponseField name="key_prefix" type="string">密钥主体的开头几个字符 —— 读取类接口永远不会返回完整密钥</ResponseField>
        <ResponseField name="key_type" type="string">`data`（产品 API）或 `admin`（本管理 API）</ResponseField>
        <ResponseField name="status" type="string">`enabled`、`disabled` 或 `expired`</ResponseField>
        <ResponseField name="created_at" type="integer">创建时间，Unix 秒</ResponseField>
        <ResponseField name="expires_at" type="integer">过期时间，Unix 秒。密钥永不过期时不返回该字段。</ResponseField>
        <ResponseField name="last_used_at" type="integer">最近一次使用时间，Unix 秒。为近似值，最多可能延迟一小时。从未使用过时不返回该字段。</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer">匹配的密钥总数</ResponseField>
    <ResponseField name="continuation_token" type="string">存在下一页时返回</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Operation completed successfully",
    "data": {
      "items": [
        {
          "id": "312",
          "name": "ci-pipeline",
          "key_prefix": "a1b2c3d4",
          "key_type": "data",
          "status": "enabled",
          "created_at": 1755000000,
          "last_used_at": 1755600000
        }
      ],
      "total": 1
    }
  }
  ```
</ResponseExample>
