docs: update api_downapp.md — add curl examples and rl_assets API
- Add curl examples for all 5 APIs (rl_verify, rl_query_groups, rl_upload, rl_status, rl_assets) - Add new section 5: rl_assets.dspy (list assets by vendor_group_id) - All curl examples use production baseurl and Bearer token auth
This commit is contained in:
parent
86d2c4edc4
commit
956ae81d49
@ -68,6 +68,18 @@ Content-Type: application/json
|
|||||||
|
|
||||||
**注意**:终端用户在 H5 页面完成认证后,系统将自动在 `rl_org_group` 表中登记该机构与组合 ID 的映射关系。
|
**注意**:终端用户在 H5 页面完成认证后,系统将自动在 `rl_org_group` 表中登记该机构与组合 ID 的映射关系。
|
||||||
|
|
||||||
|
### curl 示例
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://token.opencomputing.cn/reallife_asset/api/rl_verify.dspy' \
|
||||||
|
-H 'Authorization: Bearer YOUR_TOKEN' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"vendor": "volcengine",
|
||||||
|
"project_name": "default",
|
||||||
|
"name": "张三"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2. 查询已认证的组合列表
|
## 2. 查询已认证的组合列表
|
||||||
@ -103,6 +115,12 @@ Authorization: Bearer <your_api_key>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### curl 示例
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://token.opencomputing.cn/reallife_asset/api/rl_query_groups.dspy' \
|
||||||
|
-H 'Authorization: Bearer YOUR_TOKEN'
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3. 上传素材
|
## 3. 上传素材
|
||||||
@ -163,6 +181,19 @@ Content-Type: application/json
|
|||||||
|
|
||||||
**注意**:上传是异步操作,初始状态为 `Processing`,需调用第 4 个接口轮询状态。
|
**注意**:上传是异步操作,初始状态为 `Processing`,需调用第 4 个接口轮询状态。
|
||||||
|
|
||||||
|
### curl 示例
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://token.opencomputing.cn/reallife_asset/api/rl_upload.dspy' \
|
||||||
|
-H 'Authorization: Bearer YOUR_TOKEN' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"vendor_group_id": "volc-asset-group-xxx",
|
||||||
|
"source_url": "https://bucket.oss.com/photo.jpg",
|
||||||
|
"asset_type": "Image",
|
||||||
|
"name": "模特A"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 4. 查询素材状态
|
## 4. 查询素材状态
|
||||||
@ -202,6 +233,73 @@ Content-Type: application/json
|
|||||||
|
|
||||||
> **说明**:火山引擎的素材**永久存储**在其服务器上。`url` 是临时签名下载链接,过期后可通过再次调用 `rl_status` 获取新链接。素材的永久引用为上传时返回的 `vendor_asset_id`。
|
> **说明**:火山引擎的素材**永久存储**在其服务器上。`url` 是临时签名下载链接,过期后可通过再次调用 `rl_status` 获取新链接。素材的永久引用为上传时返回的 `vendor_asset_id`。
|
||||||
|
|
||||||
|
### curl 示例
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://token.opencomputing.cn/reallife_asset/api/rl_status.dspy' \
|
||||||
|
-H 'Authorization: Bearer YOUR_TOKEN' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"asset_id": "asset_record_id_xxx"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. 查询组合下所有素材
|
||||||
|
**Endpoint**: `/reallife_asset/api/rl_assets.dspy`
|
||||||
|
|
||||||
|
查询指定 `vendor_group_id` 下的所有素材列表。
|
||||||
|
|
||||||
|
### 请求参数
|
||||||
|
| 参数 | 必填 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| `vendor_group_id` | 是 | 认证成功后获得的供应商组合 ID |
|
||||||
|
|
||||||
|
> `org_id` 由 Bearer Token 自动获取,无需传递。
|
||||||
|
|
||||||
|
### 请求示例
|
||||||
|
```http
|
||||||
|
POST /reallife_asset/api/rl_assets.dspy
|
||||||
|
Authorization: Bearer ***
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"vendor_group_id": "volc-asset-group-xxx"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 返回示例
|
||||||
|
**成功**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"status": "ok",
|
||||||
|
"data": {
|
||||||
|
"assets": [
|
||||||
|
{
|
||||||
|
"id": "asset_record_id_xxx",
|
||||||
|
"vendor_asset_id": "asset-2026...",
|
||||||
|
"name": "模特A",
|
||||||
|
"asset_type": "Image",
|
||||||
|
"status": "Active",
|
||||||
|
"url": "https://... (临时下载链接)",
|
||||||
|
"create_time": "2026-05-28 15:30:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### curl 示例
|
||||||
|
```bash
|
||||||
|
curl -X POST 'https://token.opencomputing.cn/reallife_asset/api/rl_assets.dspy' \
|
||||||
|
-H 'Authorization: Bearer YOUR_TOKEN' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"vendor_group_id": "volc-asset-group-xxx"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 错误代码说明
|
## 错误代码说明
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user