> ## 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 平台服务申请列表

> Platform 集成指南 - Ace Data Cloud

分页返回账户拥有或获授权使用的 Application，包括余额、状态、服务摘要和关联凭证。适合批量余额监控、查找 Application ID 和进入凭证管理。

## 准备工作

1. 登录 [AceDataCloud 平台](https://platform.acedata.cloud)。
2. 在 [Account Token 控制台](https://platform.acedata.cloud/console/platform-tokens)创建账户令牌。
3. 普通用户使用 `user_id=me`；也可从 `GET /api/v1/platform-tokens/me/` 获取自己的 UUID。

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

## 接口概览

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

普通用户应传 `user_id=me`。不传时查询未先按账户收窄，分页遇到无权对象可能返回 `403`；管理员不传时可查看全表。

## 查询参数

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `user_id` | UUID / `me` | 普通用户必填 | 查询主体；支持重复参数 |
| `affiliation` | string | 否 | `owner`（默认）或 `granted`；可重复传入两者取并集，仅在有 `user_id` 时生效 |
| `service_id` | UUID | 否 | 按服务筛选；支持重复参数 |
| `scope` | string | 否 | `Individual` 或 `Global`；支持重复参数 |
| `type` | string | 否 | `Usage` 或 `Period`；支持重复参数 |
| `limit` | integer | 否 | 每页条数，最大 100 |
| `offset` | integer | 否 | 分页偏移量 |
| `ordering` | string | 否 | 仅支持 `created_at` 或 `-created_at` |

`paid`、`disabled`、`expired`、`low_balance` 和 `tag` 当前不是服务端筛选参数。余额告警应拉取列表后，根据每个 Application 的 `remaining_amount`、`service.unit` 和业务阈值在客户端判断。

## 请求示例

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

同时查看自己拥有和别人授权给自己的 Application：

```shell theme={null}
curl --get 'https://platform.acedata.cloud/api/v1/applications/' \
  --data-urlencode 'user_id=me' \
  --data-urlencode 'affiliation=owner' \
  --data-urlencode 'affiliation=granted' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}"
```

## 响应说明

响应为 `{count, items}`。每项包含 Application 模型字段，并附加：

* `service`：`id`、`alias`、`title`、`type`、`unit`、`icon_url`；
* `credentials`：当前调用者有权看到的凭证摘要；
* `paid`、`remaining_amount`、`used_amount`、`disabled`、`allow_consume_global`；
* `scope` 的真实值为 `Individual` 或 `Global`；
* `type` 的真实值为 `Usage` 或 `Period`。

`remaining_amount` 可能为空；客户端必须先判空，再做数字比较。额度单位由 `service.unit` 决定。

## 下一步

* [查询单个 Application 详情](https://platform.acedata.cloud/documents/platform-application-detail)
* [余额监控快捷指南](https://platform.acedata.cloud/documents/application-remaining-amount)
* [创建 API 凭证](https://platform.acedata.cloud/documents/platform-credential-create)
* [创建充值订单](https://platform.acedata.cloud/documents/platform-order-create)


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