queries#
Queries read from the index without modifying it. They are used for navigation, discovery, and search.
goto note#
Supplied with a valid link, returns a target and a type. The target is what the client should navigate to. The type indicates whether the link points to another note within the vault or to an external URL. See links for details.
Method: note/goto
Params:
| Field | Type | Description |
|---|---|---|
link | string | A link extracted from a note. |
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "note/goto",
"params": {
"link": "[[dendrite-is-helping-my-workflow|dendrite is helpful]]"
}
}Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"target": "~/vault/worklogs/dendrite-is-helping-my-workflow.md",
"type": "note"
}
}The possible types are either note or url. How to handle the returned link is up to
the client application.
get backlinks#
Returns a list of backlinks for a given note. Each entry in the result identifies the source note and the position of the link within that source.
Method: note/backlinks
Params:
| Field | Type | Description |
|---|---|---|
path | string | Absolute path to the note for which backlinks should be retrieved. |
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "note/backlinks",
"params": {
"path": "~/vault/worklogs/dendrite-is-helping-my-workflow.md"
}
}Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"id": "019063a1-...",
"title": "weekly review",
"slug": "weekly-review",
"path": "~/vault/logs/weekly-review.md",
"raw": "[[dendrite-is-helping-my-workflow]]",
"line": 12,
"col": 5
}
]
}Each backlink includes the source note metadata (id, title, slug, path) along with the raw link text and its line and column position in the source file.
search by tag#
Returns all notes that carry a given tag. Tags are defined in a note’s frontmatter. Useful for building tag based views of your vault.
Method: note/search_by_tag
Params:
| Field | Type | Description |
|---|---|---|
tag | string | Exact tag name to search for. |
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "note/search_by_tag",
"params": {
"tag": "distributed-systems"
}
}Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"id": "019063a1-...",
"path": "~/vault/axioms/distributed_systems/cap-theorem.md",
"title": "cap theorem",
"slug": "cap-theorem"
},
{
"id": "019063a2-...",
"path": "~/vault/axioms/distributed_systems/consensus.md",
"title": "consensus",
"slug": "consensus"
}
]
}