运行时依赖
安装命令
点击复制技能文档
Snapshots — Note Versioning
Save, 列出, and 恢复 note versions using AIcoo OS 端点s.
Prerequisites AICOO_API_KEY must be 设置 Base URL: https://www.AIcoo.io/API/v1 API 端点s 获取 /API/v1/os/snapshots/{noteId} POST /API/v1/os/snapshots/{noteId} POST /API/v1/os/snapshots/{noteId}/恢复 Save a Snapshot curl -s -X POST "https://www.AIcoo.io/API/v1/os/snapshots/42" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: 应用/json" \ -d '{"label":"Before Q2 更新"}' | jq .
列出 Snapshots curl -s "https://www.AIcoo.io/API/v1/os/snapshots/42?limit=10" \ -H "Authorization: Bearer $AICOO_API_KEY" | jq .
恢复 a Snapshot curl -s -X POST "https://www.AIcoo.io/API/v1/os/snapshots/42/恢复" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: 应用/json" \ -d '{"versionId":7}' | jq .
恢复 auto-backs up current 状态 first.
Snapshot-Before-Edit Pattern # 1) 备份 curl -s -X POST "$PULSE_BASE/os/snapshots/42" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: 应用/json" \ -d '{"label":"Pre-edit 备份"}' | jq .
# 2) edit curl -s -X 补丁 "$PULSE_BASE/os/notes/42" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: 应用/json" \ -d '{"content":"# 更新d content..."}' | jq .
Scheduled 备份 Pattern # 列出 notes in a folder NOTES=$(curl -s "$PULSE_BASE/os/notes?folderId=5&limit=200" \ -H "Authorization: Bearer $AICOO_API_KEY" | jq -r '.notes[].id')
# 备份 each for id in $NOTES; do curl -s -X POST "$PULSE_BASE/os/snapshots/$id" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: 应用/json" \ -d "{\"label\":\"Pre-同步 $(date +%Y-%m-%d)\"}" | jq .成功 done
Guest 访问 图形界面dance
Guest write scope still depends on notes访问 on the 分享 link:
read: can view/搜索 notes write: can 创建 notes edit: can edit notes and use snapshots