siyuan

Solid

SiYuan Note API for searching, reading, creating, and managing blocks and documents in a self-hosted knowledge base via curl.

AI & Automation 191,515 stars 33299 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# SiYuan Note API Use the [SiYuan](https://github.com/siyuan-note/siyuan) kernel API via curl to search, read, create, update, and delete blocks and documents in a self-hosted knowledge base. No extra tools needed -- just curl and an API token. ## Prerequisites 1. Install and run SiYuan (desktop or Docker) 2. Get your API token: **Settings > About > API token** 3. Store it in `~/.hermes/.env`: ``` SIYUAN_TOKEN=your_token_here SIYUAN_URL=http://127.0.0.1:6806 ``` `SIYUAN_URL` defaults to `http://127.0.0.1:6806` if not set. ## API Basics All SiYuan API calls are **POST with JSON body**. Every request follows this pattern: ```bash curl -s -X POST "${SIYUAN_URL:-http://127.0.0.1:6806}/api/..." \ -H "Authorization: Token $SIYUAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"param": "value"}' ``` Responses are JSON with this structure: ```json {"code": 0, "msg": "", "data": { ... }} ``` `code: 0` means success. Any other value is an error -- check `msg` for details. **ID format:** SiYuan IDs look like `20210808180117-6v0mkxr` (14-digit timestamp + 7 alphanumeric chars). ## Quick Reference | Operation | Endpoint | |-----------|----------| | Full-text search | `/api/search/fullTextSearchBlock` | | SQL query | `/api/query/sql` | | Read block | `/api/block/getBlockKramdown` | | Read children | `/api/block/getChildBlocks` | | Get path | `/api/filetree/getHPathByID` | | Get attributes | `/api/attr/getBlockAttrs` | | List notebooks | `/api/notebook/ls...

Details

Author
NousResearch
Repository
NousResearch/hermes-agent
Created
10 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category