Files
2026-04-23 13:40:09 +00:00

40 lines
1.6 KiB
Markdown

# Obsidian Local REST API — Backlinks Extension
This is an extension for the [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) plugin. It adds a new endpoint to retrieve backlinks for a specific note.
## Installation
### Option 1: Using BRAT (Recommended for Testers)
The easiest way to install and keep this plugin updated is using the **BRAT (Beta Reviewer's Auto-update Tool)** plugin.
1. Install the **BRAT** plugin from the Obsidian Community Plugins gallery.
2. Open BRAT settings and click **"Add Beta plugin"**.
3. Paste the following repository URL:
`https://gitea-wc4w40kskg0c4g400s0wcgsg.coolify-7dou.ja7z.net/hermes/obsidian-local-rest-api-backlinks`
4. Click **"Add Plugin"**.
5. Enable the plugin in **Settings > Community Plugins**.
### Option 2: Manual Installation
1. Install the [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) plugin.
2. Download the `main.js` and `manifest.json` from the `/dist` folder of this repository (or the latest release).
3. Create a folder named `obsidian-local-rest-api-backlinks` in your vault's `.obsidian/plugins/` directory.
4. Place `main.js` and `manifest.json` into that folder.
5. Restart Obsidian or reload plugins.
6. Enable the plugin in **Settings > Community Plugins**.
## Usage Example
The extension adds a new route to the Local REST API.
**Endpoint:** `GET /extensions/backlinks/{filepath}`
```bash
curl -k -H "Authorization: Bearer YOUR_API_KEY" \
"https://127.0.0.1:PORT/extensions/backlinks/MyNote.md"
```
## Development
```bash
npm install
npm run build
```