Files
MemRelay/projects/6f47523e-e22e-4cdd-bd18-76e5e474ee0c/FastAPI 后端 API 端点.md
T

40 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: FastAPI 后端 API 端点
type: fact
permalink: main/projects/6f47523e-e22e-4cdd-bd18-76e5e474ee0c/fast-api-后端-api-端点
stable_id: 86452d01-8146-41aa-80f9-7d5481135394
scope: project
project_id: 6f47523e-e22e-4cdd-bd18-76e5e474ee0c
memory_type: fact
status: active
revision: 1
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
created_at: '2026-09-23T14:58:38.419566+00:00'
updated_at: '2026-09-23T14:58:38.419619+00:00'
tags:
- api
- endpoints
---
## 只读端点
- GET /api/profiles — 列出可用设备配置
- GET /api/status — 构建状态(running、exit_code、started_at、ended_at)
- GET /api/artifacts/{profile} — 列出构建产物
- GET /api/runtime-mirror/{profile}/{mirror_id} — 检查运行时镜像兼容性
- GET /api/package-catalog/{profile} — 软件目录
- GET /api/saved-config/{profile} — 读取已保存配置
- GET /api/logs/stream — SSE 实时日志流
## 写入端点
- PUT /api/saved-config/{profile} — 保存配置
- DELETE /api/saved-config/{profile} — 删除已保存配置
- POST /api/build — 启动构建
- POST /api/stop — 停止构建
- POST /api/package-catalog/{profile}/refresh — 同步软件目录
## 安全注意
- 所有端点无身份认证,监听 0.0.0.0
- 构建状态保存在单进程内存,重启或多 worker 会丢失