API v1
v1
View as Markdown

Search notes and lists

GET /api/v1/vaults/{vault}/knowledge/search

Find the notes and lists of a vault's Knowledge holding every word given.

A note or a list is found when each word is in its title, its text, its description or any of its cells. Case and accents are ignored as the language of the account ignores them, a word is found at the start of a longer one, and one typing mistake is tolerated from five letters, two from nine.

This endpoint also answers QUERY, with the same parameters sent in the request body. How QUERY works.

Parameters

Sent as JSON. Anything not listed here is ignored.

vault string Required

The vault, named either by the readable name it reports as slug or by its id. A vault of another account answers 404.

query string Required

The words to find, at least two characters and up to 255.

Returns

The notes and the lists found, or an empty list. A vault of another account answers 404.

data array

Every note found, then every list found, whole rather than a page at a time.

data[] object

One knowledge note, or one knowledge list as the knowledge lists endpoints describe it, told apart by type.

data[].type string

knowledge_note or knowledge_list.

data[].id string

The id of the note or the list.

data[].attributes object

Everything the note holds, or what the list is without its columns and items.

data[].attributes.title string

The title of the note.

data[].attributes.folder object

The folder the note sits in.

data[].attributes.folder.id uuid

The id of the folder, as the knowledge folders endpoints give it.

data[].attributes.folder.name string

What the folder is called.

data[].attributes.created_at timestamp

When the note was written, as a count of seconds since 1970.

data[].attributes.updated_at timestamp

When it last changed, as a count of seconds, or null.

data[].attributes.body string

The text of the note in Markdown, exactly as written, or null. It is never drawn: raw HTML in it stays text, and the application escapes it when it shows the note.

data[].attributes.headings array

The headings of the text, from the first level to the third, in reading order.

data[].attributes.headings[] object

One heading.

data[].attributes.headings[].text string

What the heading says.

data[].attributes.headings[].level integer

Its level, 1 to 3.

data[].attributes.headings[].anchor string

The anchor the application gives it, to open the note at that heading with links.web followed by # and the anchor.

data[].attributes.description string

For a list, what it is for, in Markdown as written, or null. A note carries none.

data[].links object

Where to find this note or list.

data[].links.self string

The absolute address it is read from.

data[].links.web string

The note or the list in the application.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

GET
curl https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/search?query=dundies \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/search?query=dundies', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/search?query=dundies');
Response 200
{
"data": [
{
"type": "knowledge_note",
"id": "7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92",
"attributes": {
"title": "Dundies speech",
"body": "## Best dressed\nPam, again.\n\n- [x] Book Chili's\n- [ ] Engrave the trophies",
"headings": [
{
"text": "Best dressed",
"level": 2,
"anchor": "section-best-dressed"
}
],
"folder": {
"id": "2b7e4c91-0d5a-4f38-9c16-8e3a7f1b5d24",
"name": "Office"
},
"created_at": 1773331200,
"updated_at": 1773417600
},
"links": {
"self": "https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92",
"web": "https://my.monicahq.com/vaults/dunder-mifflin/knowledge/notes/7a2d9e4f-1c63-4b85-9f07-3e6c8a1d5b92"
}
},
{
"type": "knowledge_list",
"id": "6d1f8b34-2a95-4c7e-b0d3-9e5a1c7f4b26",
"attributes": {
"title": "Dundies nominees",
"description": "Who might win this year.",
"folder": {
"id": "2b7e4c91-0d5a-4f38-9c16-8e3a7f1b5d24",
"name": "Office"
},
"created_at": 1773331200,
"updated_at": 1773417600
},
"links": {
"self": "https://my.monicahq.com/api/v1/vaults/dunder-mifflin/knowledge/lists/6d1f8b34-2a95-4c7e-b0d3-9e5a1c7f4b26",
"web": "https://my.monicahq.com/vaults/dunder-mifflin/knowledge/lists/6d1f8b34-2a95-4c7e-b0d3-9e5a1c7f4b26"
}
}
]
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.