← 返回
未分类 Key 中文

obsidian-rest-api

Operate Obsidian via Local REST API plugin from remote/WSL environments. Use when: (1) user asks to operate Obsidian, read/write notes, or manage vault remot...
通过本地REST API 插件在远程/WSL 环境下操作 Obsidian。适用于:(1) 用户要求操作 Obsidian、读写笔记或远程管理保管库。
jieszs
未分类 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 254
下载
💾 0
安装
1
版本
#latest

概述

Obsidian REST API

Operate Obsidian via Local REST API plugin from WSL or remote environments.

First-Time Setup

On first use, automatically detect and save configuration:

  1. Check TOOLS.md for existing OBSIDIAN_API_URL and OBSIDIAN_API_KEY
  2. If not found:
    • Get Windows host IP: cat /etc/resolv.conf | grep nameserver | awk '{print $2}'
    • Ask user for API Key
    • Save to TOOLS.md:

```markdown

### Obsidian REST API (WSL → Windows)

API 端点: https://:27124

API Key:

```

  1. Test connection with saved config

Configuration Format

Saved in TOOLS.md:

### Obsidian REST API (WSL → Windows)
**API 端点**: https://<windows-host-ip>:27124
**API Key**: <your-api-key>

Quick Start

# Get URL and KEY from TOOLS.md
URL=$(grep 'API 端点' ~/.openclaw/workspace/TOOLS.md | awk -F': ' '{print $2}')
KEY=$(grep 'API Key' ~/.openclaw/workspace/TOOLS.md | awk -F': ' '{print $2}')

# Test connection
curl -k -H "Authorization: Bearer $KEY" "$URL/"

# List vault files
curl -k -H "Authorization: Bearer $KEY" "$URL/vault/"

# Create note
curl -k -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
  -d "# Title\nContent" "$URL/vault/note.md"

Common Tasks

Create/Update Note

curl -k -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
  --data "<content>" "$URL/vault/<filename>.md"

Append to Note

curl -k -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
  --data "<content-to-append>" "$URL/vault/<filename>.md"

Get Daily Note

curl -k -H "Authorization: Bearer $KEY" "$URL/periodic/daily/"
# Or specific date:
curl -k -H "Authorization: Bearer $KEY" "$URL/periodic/daily/2026/05/11/"

Search Notes

# Simple text search
curl -k -X POST -H "Authorization: Bearer $KEY" \
  "$URL/search/simple/?query=keyword"

# Advanced search (Dataview-style)
curl -k -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"query":"tag:#work"}' "$URL/search/"

Get Active File

curl -k -H "Authorization: Bearer $KEY" "$URL/active/"

Open File in UI

curl -k -X POST -H "Authorization: Bearer $KEY" "$URL/open/note.md"

Execute Command

# List available commands
curl -k -H "Authorization: Bearer $KEY" "$URL/commands/"

# Execute command
curl -k -X POST -H "Authorization: Bearer $KEY" "$URL/commands/daily-notes"

Get All Tags

curl -k -H "Authorization: Bearer $KEY" "$URL/tags/"

API Reference

See references/api.md for complete endpoint documentation.

Troubleshooting

Connection refused: Windows firewall blocking port.

# PowerShell (admin)
New-NetFirewallRule -DisplayName "Obsidian REST API" -Direction Inbound -LocalPort 27124 -Protocol TCP -Action Allow

SSL error: Use -k flag (self-signed cert).

Vault not found: Ensure vault is open in Obsidian.

Windows Setup

  1. Install Local REST API plugin in Obsidian
  2. Enable "Bind to all interfaces" in plugin settings
  3. Allow port in Windows firewall
  4. Generate API key

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-21 14:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,369 📥 319,536
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,222 📥 267,235
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,070 📥 803,990