create: 电脑端账号与日志接口约定
MemRelay-Operation: memory-save:tapremly-desktop-api-20261012 MemRelay-Resource: 30df1c63-c92f-4ee6-a466-c0cfa1fc7f1b
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: 电脑端账号与日志接口约定
|
||||||
|
type: decision
|
||||||
|
permalink: main/projects/a3d34eb4-af25-4b89-9faa-2d3f4a996f6b/电脑端账号与日志接口约定
|
||||||
|
stable_id: 30df1c63-c92f-4ee6-a466-c0cfa1fc7f1b
|
||||||
|
scope: project
|
||||||
|
memory_type: decision
|
||||||
|
project_id: a3d34eb4-af25-4b89-9faa-2d3f4a996f6b
|
||||||
|
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||||
|
status: active
|
||||||
|
revision: 1
|
||||||
|
request_id: tapremly-desktop-api-20261012
|
||||||
|
created_at: '2026-10-11T23:07:27.297678+00:00'
|
||||||
|
updated_at: '2026-10-11T23:07:27.297678+00:00'
|
||||||
|
tags:
|
||||||
|
- api
|
||||||
|
- desktop
|
||||||
|
---
|
||||||
|
|
||||||
|
电脑端被控不连 NixMsg 以外的账号服务按以下约定调用(server 尚未实现时先按此对齐):POST /api/login {username,password} 成功 2xx 并 Set-Cookie;DELETE /api/login 退出;GET/POST /api/devices;PATCH/DELETE /api/devices/{id};GET/POST /api/groups;PATCH/DELETE /api/groups/{id};PUT /api/devices/{endpointId}/logs,Authorization Bearer 为创建设备返回的 device_token,正文 {items:[{at,summary,ok,detail}]};GET 同路径读服务端最近记录。创建本机设备时 POST /api/devices 只带 name,期望返回 endpoint_id、password、device_token。添加别人的端时带 endpoint_id 和 name。本地日志最多 500 条,实现在当前用户的 state.json,不是 SQLite。NixMsg 正文除 PRD 已列类型外,拉取用 shortcuts_get 与 logs_get,不认识的 type 忽略。
|
||||||
Reference in New Issue
Block a user