> ## 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.