docs: auto-generate API route documentation
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Id0d1f9769b7ccdbf83d5fa78adef62e46a6a6964
This commit is contained in:
parent
625077f341
commit
7a0a009ced
40 changed files with 17444 additions and 1 deletions
142
docs/api/notes.md
Normal file
142
docs/api/notes.md
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
# Notes
|
||||
|
||||
Markdown notes link graph
|
||||
|
||||
## Endpoints
|
||||
|
||||
### GET /api/v1/media/{id}/backlinks
|
||||
|
||||
Get backlinks (incoming links) to a media item.
|
||||
|
||||
GET /api/v1/media/{id}/backlinks
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | In | Required | Description |
|
||||
|------|----|----------|-------------|
|
||||
| `id` | path | Yes | Media item ID |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Backlinks |
|
||||
| 401 | Unauthorized |
|
||||
| 404 | Not found |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
### GET /api/v1/media/{id}/outgoing-links
|
||||
|
||||
Get outgoing links from a media item.
|
||||
|
||||
GET /api/v1/media/{id}/outgoing-links
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | In | Required | Description |
|
||||
|------|----|----------|-------------|
|
||||
| `id` | path | Yes | Media item ID |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Outgoing links |
|
||||
| 401 | Unauthorized |
|
||||
| 404 | Not found |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
### POST /api/v1/media/{id}/reindex-links
|
||||
|
||||
Re-extract links from a media item.
|
||||
|
||||
POST /api/v1/media/{id}/reindex-links
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | In | Required | Description |
|
||||
|------|----|----------|-------------|
|
||||
| `id` | path | Yes | Media item ID |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Links reindexed |
|
||||
| 401 | Unauthorized |
|
||||
| 404 | Not found |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
### GET /api/v1/notes/graph
|
||||
|
||||
Get graph data for visualization.
|
||||
|
||||
GET /api/v1/notes/graph?center={uuid}&depth={n}
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | In | Required | Description |
|
||||
|------|----|----------|-------------|
|
||||
| `center` | query | No | Center node ID |
|
||||
| `depth` | query | No | Traversal depth (max 5, default 2) |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Graph data |
|
||||
| 401 | Unauthorized |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
### POST /api/v1/notes/resolve-links
|
||||
|
||||
Resolve all unresolved links in the database.
|
||||
|
||||
POST /api/v1/notes/resolve-links
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Links resolved |
|
||||
| 401 | Unauthorized |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
### GET /api/v1/notes/unresolved-count
|
||||
|
||||
Get count of unresolved links.
|
||||
|
||||
GET /api/v1/notes/unresolved-count
|
||||
|
||||
**Authentication:** Required (Bearer JWT)
|
||||
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 200 | Unresolved link count |
|
||||
| 401 | Unauthorized |
|
||||
| 500 | Internal server error |
|
||||
|
||||
---
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue