# 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 | ---