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

# 获取 AceDataCloud 平台 API 凭证列表

> Platform 集成指南 - Ace Data Cloud

分页列出业务 API 凭证。该响应当前包含 Token 或 Identity 凭证的敏感字段，必须只在服务端处理，禁止写入日志、分析平台、前端持久化或公开仓库。

## 准备工作

创建 [Account Token](https://platform.acedata.cloud/documents/platform-token)，并通过 `GET /api/v1/platform-tokens/me/` 获取当前账户 UUID。

```shell theme={null}
export PLATFORM_TOKEN='你的账户令牌'
export USER_ID='你的账户 UUID'
```

## 接口概览

| 项 | 内容 |
| - | - |
| 方法 | `GET` |
| URL | `https://platform.acedata.cloud/api/v1/credentials/` |
| 鉴权 | Account Token，OAuth token 需 `credentials:read` |
| 分页 | `count` + `items` |

普通用户应传自己的 `user_id` 或一个已获授权的 `application_id`，否则分页遇到无权对象时可能返回 `403`。

## 查询参数

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `user_id` | string | 视场景 | 凭证持有人；支持重复参数 |
| `application_id` | UUID | 否 | 按 Application 筛选；支持重复参数 |
| `host` | string | 否 | 按 host 精确筛选；支持重复参数 |
| `name` | string | 否 | 按名称精确筛选；支持重复参数 |
| `granted` | boolean | 否 | `true` 为授权给他人的凭证，`false` 为自用凭证 |
| `limit` / `offset` | integer | 否 | 分页 |
| `ordering` | string | 否 | `created_at` 或 `-created_at` |

`service_id`、`disabled`、`expired` 当前不是筛选参数。

```shell theme={null}
curl --get 'https://platform.acedata.cloud/api/v1/credentials/' \
  --data-urlencode "user_id=${USER_ID}" \
  --data-urlencode 'limit=100' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}"
```

## 响应说明

线上已验证响应为 `{count, items}`。每项包含 `id`、`application_id`、`application`、`user_id`、`creator_id`、`name`、`type`、`limited_amount`、`used_amount`、`expired_at`、`allowed_api_ids`、`host`、`granted`、`granted_to_user_id`、`tags`、`metadata` 和时间字段，并按类型返回 `token` 或 `username/password`。

> 当前列表响应返回完整敏感值。不要展示到浏览器控制台或采集系统，也不要依赖通过列表恢复明文；客户端应兼容未来的脱敏策略。

## 下一步

* [创建 API 凭证](https://platform.acedata.cloud/documents/platform-credential-create)
* [轮换 API 凭证](https://platform.acedata.cloud/documents/platform-credential-rotate)
* [删除 API 凭证](https://platform.acedata.cloud/documents/platform-credential-delete)
* [按凭证筛选调用记录](https://platform.acedata.cloud/documents/platform-usage-list)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.