> ## 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 ID 获取单个服务申请的完整状态——比列表接口多出 `service` 完整对象（含 `packages` 套餐）等字段，适用于详情页。

> ℹ️ 本接口属于 **AceDataCloud 平台管理 API**，统一前缀 `https://platform.acedata.cloud/api/v1/`。完整接口索引见[获取 AceDataCloud 平台文档列表](https://platform.acedata.cloud/documents/platform-document-list)。

## 接口概览

| 项 | 内容 |
| - | - |
| 方法 | `GET` |
| URL | `https://platform.acedata.cloud/api/v1/applications/{application_id}` |
| 鉴权 | ✅ 需要账户令牌 |

`/applications/{id}` 与 `/applications/{id}/` 当前都可用；示例统一使用无尾斜杠形式。

## 鉴权说明（如何获取账户令牌）

请求头：

```http theme={null}
Authorization: Bearer ${PLATFORM_TOKEN}
```

详细获取方式见[管理 AceDataCloud 平台账户令牌](https://platform.acedata.cloud/documents/platform-token)。

> ℹ️ 与列表接口不同，**详情接口的权限校验是直接对单一对象做**，无需传 `?user_id=`。但你访问别人的申请会得到 `403 permission_denied`。

## 路径参数

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `application_id` | UUID | ✅ | Application ID |

## 请求示例

### cURL

```shell theme={null}
curl 'https://platform.acedata.cloud/api/v1/applications/82f57141-2323-4453-8730-60f7d833a2da' \
  -H 'accept: application/json' \
  -H "authorization: Bearer ${PLATFORM_TOKEN}"
```

### Python

```python theme={null}
import os
import requests

app_id = "82f57141-2323-4453-8730-60f7d833a2da"
resp = requests.get(
    f"https://platform.acedata.cloud/api/v1/applications/{app_id}",
    headers={
        "accept": "application/json",
        "authorization": f"Bearer {os.environ['PLATFORM_TOKEN']}",
    },
    timeout=10,
)
app = resp.json()
print(f"服务：{app['service']['title']}")
print(f"剩余 {app['remaining_amount']} {app['service']['unit']} / 已用 {app['used_amount']}")
```

### Node.js

```javascript theme={null}
const appId = '82f57141-2323-4453-8730-60f7d833a2da'
const r = await fetch(`https://platform.acedata.cloud/api/v1/applications/${appId}`, {
  headers: { authorization: `Bearer ${process.env.PLATFORM_TOKEN}` },
})
console.log(await r.json())
```

## 响应示例（HTTP 200）

```json theme={null}
{
  "id": "82f57141-2323-4453-8730-60f7d833a2da",
  "service_id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452",
  "remaining_amount": 100.0,
  "used_amount": 12.34,
  "paid": true,
  "user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
  "disabled": false,
  "allow_consume_global": false,
  "scope": "Individual",
  "type": "Usage",
  "expired_at": null,
  "tags": null,
  "metadata": null,
  "service": {
    "id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452",
    "alias": "openai",
    "title": "OpenAI",
    "type": "Api",
    "unit": "Credit",
    "free_amount": 1.0,
    "packages": [
      {
        "id": "...",
        "type": "Usage",
        "price": 10.0,
        "amount": 100.0
      }
    ]
  },
  "created_at": "2026-04-26T07:52:27.462400Z",
  "updated_at": "2026-04-26T08:42:13.123456Z"
}
```

## 响应字段说明

字段含义同[列表接口](https://platform.acedata.cloud/documents/platform-application-list)，额外包含：

| 字段 | 类型 | 说明 |
| - | - | - |
| `service` | object | 完整的服务对象（含 `packages` 套餐、`unit`、`free_amount`），可直接渲染服务详情面板 |

## 错误处理

| HTTP | code | 含义 |
| - | - | - |
| 401 | `not_authenticated` | 缺少账户令牌 |
| 403 | `permission_denied` | 该 Application 不属于你 |
| 404 | `not_found` | Application 不存在或已删除 |

## 实用提示

* **批量监控优先使用列表**：一次拉取 Application 列表后按各服务的单位和阈值判断，避免逐个请求详情。
* **需要查看凭证数量时**：使用[API 凭证列表](https://platform.acedata.cloud/documents/platform-credential-list)按 `application_id` 筛选。
* **`disabled=true` 排查思路**：检查工单 / 邮件通知，看是否因风控、欠费、违规调用被关停；不能通过 API 解除，必须联系客服。

## 相关接口

* [获取 AceDataCloud 平台服务申请列表](https://platform.acedata.cloud/documents/platform-application-list)
* [创建 AceDataCloud 平台服务申请](https://platform.acedata.cloud/documents/platform-application-create)
* [设置 AceDataCloud 平台应用的全局余额共享](https://platform.acedata.cloud/documents/platform-application-consume-global)
* [获取 AceDataCloud 平台 API 凭证列表](https://platform.acedata.cloud/documents/platform-credential-list)


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