/install obsidian-rest-api
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:
- Check TOOLS.md for existing
OBSIDIAN_API_URLandOBSIDIAN_API_KEY - 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:
### Obsidian REST API (WSL → Windows) **API 端点**: https://\x3Cdetected-ip>:27124 **API Key**: \x3Cuser-provided-key>
- Get Windows host IP:
- Test connection with saved config
Configuration Format
Saved in TOOLS.md:
### Obsidian REST API (WSL → Windows)
**API 端点**: https://\x3Cwindows-host-ip>:27124
**API Key**: \x3Cyour-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\
Content" "$URL/vault/note.md"
Common Tasks
Create/Update Note
curl -k -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
--data "\x3Ccontent>" "$URL/vault/\x3Cfilename>.md"
Append to Note
curl -k -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: text/markdown" \
--data "\x3Ccontent-to-append>" "$URL/vault/\x3Cfilename>.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
- Install
Local REST APIplugin in Obsidian - Enable "Bind to all interfaces" in plugin settings
- Allow port in Windows firewall
- Generate API key
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install obsidian-rest-api - After installation, invoke the skill by name or use
/obsidian-rest-api - Provide required inputs per the skill's parameter spec and get structured output
What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.
How do I install obsidian-rest-api?
Run "/install obsidian-rest-api" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is obsidian-rest-api free?
Yes, obsidian-rest-api is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does obsidian-rest-api support?
obsidian-rest-api is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created obsidian-rest-api?
It is built and maintained by Jieszs (@jieszs); the current version is v1.0.1.