Skip to content

Build your personal knowledge base with Trilium Notes

feat(docs): fold the type into the API description column

Elian Doran6b82806e651c
diff --git a/apps/edit-docs/src/openapi_markdown.spec.ts b/apps/edit-docs/src/openapi_markdown.spec.ts
index a9b4088d62..60e200da81 100644
--- a/apps/edit-docs/src/openapi_markdown.spec.ts
+++ b/apps/edit-docs/src/openapi_markdown.spec.ts
@@ -79,15 +79,15 @@ describe("openApiToMarkdown", () => {
expect(markdown).toContain([
"**Path parameters**",
"",
- "| Name | Type | Description |",
- "| --- | --- | --- |",
- "| `noteId`<br>*required* | `EntityId` | |",
+ "| Name | Description |",
+ "| --- | --- |",
+ "| `noteId`<br>*required* | `EntityId` |",
"",
"**Query parameters**",
"",
- "| Name | Type | Description |",
- "| --- | --- | --- |",
- "| `force` | `boolean` | skip checks |"
+ "| Name | Description |",
+ "| --- | --- |",
+ "| `force` | `boolean`<br>skip checks |"
].join("\n"));
// The body's properties are listed in place, even when its schema is a reference, in a
// column beside its sample, written as the Markdown export writes a multicolumn layout.
@@ -95,9 +95,9 @@ describe("openApiToMarkdown", () => {
"<div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\">",
"<div class=\"trilium-multicolumn-column\">",
"",
- "| Property | Type | Description |",
- "| --- | --- | --- |",
- "| `title`<br>*required* | `string` | |",
+ "| Property | Description |",
+ "| --- | --- |",
+ "| `title`<br>*required* | `string` |",
"",
"</div>",
"<div class=\"trilium-multicolumn-column\">",
@@ -202,16 +202,16 @@ describe("openApiToMarkdown", () => {
"",
"A note",
"",
- "| Property | Type | Description |",
- "| --- | --- | --- |",
- "| `noteId`<br>*required* | `EntityId` | The note's ID |",
+ "| Property | Description |",
+ "| --- | --- |",
+ "| `noteId`<br>*required* | `EntityId`<br>The note's ID |",
// Without a description of its own, a property takes the one of the schema it references.
- "| `parentNoteId` | `EntityId` | Unique ID |",
- "| `type` | `string` | note type. One of `text`, `code`. |",
- "| `attributes` | `array of Attribute` | |",
- "| `dateCreated` | `string (date-time) \\| null` | |",
- "| `parent` | `EntityId \\| string \\| null` | |",
- "| `content` | `EntityId` | Line one line \\| two |"
+ "| `parentNoteId` | `EntityId`<br>Unique ID |",
+ "| `type` | `string`<br>note type. One of `text`, `code`. |",
+ "| `attributes` | `array of Attribute` |",
+ "| `dateCreated` | `string (date-time) \\| null` |",
+ "| `parent` | `EntityId \\| string \\| null` |",
+ "| `content` | `EntityId`<br>Line one line \\| two |"
].join("\n"));
});
diff --git a/apps/edit-docs/src/openapi_markdown.ts b/apps/edit-docs/src/openapi_markdown.ts
index 3ce3bc88b1..988590644d 100644
--- a/apps/edit-docs/src/openapi_markdown.ts
+++ b/apps/edit-docs/src/openapi_markdown.ts
@@ -200,8 +200,8 @@ function renderOperation(spec: OpenApiSpec, { method, path, pathItem, operation
const located = parameters.filter((p) => p.in === location);
if (located.length) {
blocks.push(`**${label}**`, table(
- [ "Name", "Type", "Description" ],
- located.map((p) => [ nameCell(p.name, p.required), code(typeOf(p.schema)), describe(p) ])
+ [ "Name", "Description" ],
+ located.map((p) => [ nameCell(p.name, p.required), detailsCell(typeOf(p.schema), describe(p)) ])
));
}
}
@@ -368,14 +368,11 @@ function renderSchema(spec: OpenApiSpec, name: string, schema: Schema) {
function propertyTable(spec: OpenApiSpec, { properties, required }: Schema) {
const requiredProperties = new Set(required);
return table(
- [ "Property", "Type", "Description" ],
+ [ "Property", "Description" ],
Object.entries(properties ?? {}).map(([ property, propertySchema ]) => {
const resolved = resolve(spec, propertySchema);
- return [
- nameCell(property, requiredProperties.has(property)),
- code(typeOf(propertySchema)),
- describe({ description: propertySchema.description ?? resolved.description, schema: resolved })
- ];
+ const description = describe({ description: propertySchema.description ?? resolved.description, schema: resolved });
+ return [ nameCell(property, requiredProperties.has(property)), detailsCell(typeOf(propertySchema), description) ];
})
);
}
@@ -478,6 +475,11 @@ function nameCell(text: string, required?: boolean) {
return required ? `${code(text)}<br>*required*` : code(text);
}
+/** The description cell of a parameter or property, its type on the first line. */
+function detailsCell(type: string, description: string) {
+ return [ code(type), description ].filter(Boolean).join("<br>");
+}
+
function code(text: string) {
return text ? `\`${text}\`` : "";
}
diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.json
index 9a79a1a972..862974b204 100644
--- a/apps/server/src/assets/help/help_content.json
+++ b/apps/server/src/assets/help/help_content.json
@@ -220,7 +220,7 @@
"_help_J5Ex1ZrMbyJ6": "<p>Trilium provides a mechanism for <a href=\"#root/_help_CdNpE2pqjmI6\">scripts</a> to open a public REST endpoint. This opens a way for various integrations with other services - a simple example would be creating new note from Slack by issuing a slash command (e.g. <code>/trilium buy milk</code>).</p><h2>Create note from outside Trilium</h2><p>Let's take a look at an example. The goal is to provide a REST endpoint to which we can send title and content and Trilium will create a note.</p><p>We'll start with creating a JavaScript backend <a href=\"#root/_help_6f9hih2hXXZk\">code note</a> containing:</p><pre><code class=\"language-text-x-trilium-auto\">const {req, res} = api;\nconst {secret, title, content} = req.body;\n\nif (req.method == 'POST' &amp;&amp; secret === 'secret-password') {\n // notes must be saved somewhere in the tree hierarchy specified by a parent note. \n // This is defined by a relation from this code note to the \"target\" parent note\n // alternatively you can just use constant noteId for simplicity (get that from \"Note info\" dialog of the desired parent note)\n const targetParentNoteId = api.currentNote.getRelationValue('targetNote');\n \n const {note} = api.createTextNote(targetParentNoteId, title, content);\n const notePojo = note.getPojo();\n\n res.status(201).json(notePojo);\n}\nelse {\n res.send(400);\n}</code></pre><p>This script note has also following two attributes:</p><ul><li>label <code>#customRequestHandler</code> with value <code>create-note</code></li><li>relation <code>~targetNote</code> pointing to a note where new notes should be saved</li></ul><h3>Explanation</h3><p>Let's test this by using an HTTP client to send a request:</p><pre><code class=\"language-text-x-trilium-auto\">POST http://your-trilium-server/custom/create-note\nContent-Type: application/json\n\n{\n \"secret\": \"secret-password\",\n \"title\": \"hello\",\n \"content\": \"world\"\n}+++++++++++++++++++++++++++++++++++++++++++++++</code></pre><p>Notice the <code>/custom</code> part in the request path - Trilium considers any request with this prefix as \"custom\" and tries to find a matching handler by looking at all notes which have <code>customRequestHandler</code> <a href=\"#root/_help_zEY4DaJG4YT5\">label</a>. Value of this label then contains a regular expression which will match the request path (in our case trivial regex \"create-note\").</p><p>Trilium will then find our code note created above and execute it. <code>api.req</code>, <code>api.res</code> are set to <a href=\"https://expressjs.com/en/api.html#req\">request</a> and <a href=\"https://expressjs.com/en/api.html#res\">response</a>objects from which we can get details of the request and also respond.</p><p>In the code note we check the request method and then use trivial authentication - keep in mind that these endpoints are by default totally unauthenticated, and you need to take care of this yourself.</p><p>Once we pass these checks we will just create the desired note using <a href=\"#root/_help_GLks18SNjxmC\">Script API</a>.</p><h2>Custom resource provider</h2><p>Another common use case is that you want to just expose a file note - in such case you create label <code>customResourceProvider</code> (value is again path regex).</p><p>For more information, see&nbsp;<a href=\"#root/_help_d3fAXQ2diepH\">Custom Resource Providers</a>.</p><h2>Advanced concepts</h2><p><code>api.req</code> and <code>api.res</code> are Express.js objects - you can always look into its <a href=\"https://expressjs.com/en/api.html\">documentation</a> for details.</p><h3>Parameters</h3><p>REST request paths often contain parameters in the URL, e.g.:</p><pre><code class=\"language-text-x-trilium-auto\">http://your-trilium-server/custom/notes/123</code></pre><p>The last part is dynamic so the matching of the URL must also be dynamic - for this reason the matching is done with regular expressions. Following <code>customRequestHandler</code> value would match it:</p><pre><code class=\"language-text-x-trilium-auto\">notes/([0-9]+)</code></pre><p>Additionally, this also defines a matching group with the use of parenthesis which then makes it easier to extract the value. The matched groups are available in <code>api.pathParams</code>:</p><pre><code class=\"language-text-x-trilium-auto\">const noteId = api.pathParams[0];</code></pre><p>Often you also need query params (as in e.g. <code>http://your-trilium-server/custom/notes?noteId=123</code>), you can get those with standard express <code>req.query.noteId</code>.</p>",
"_help_d3fAXQ2diepH": "<p>A custom resource provider allows any file imported into Trilium (images, fonts, stylesheets) to be publicly accessible via a URL.</p><p>A potential use case for this is to add embed a custom font alongside a theme.</p><h2>Steps for creating a custom resource provider</h2><ol><li>Import a file such as an image or a font into Trilium by drag &amp; drop.</li><li>Set the <a href=\"#root/_help_HI6GBBIduIgv\">label</a> <code>#customResourceProvider</code> to <code>hello</code>.</li><li>To test if it is working, use a browser to navigate to <code>&lt;protocol&gt;://&lt;host&gt;/custom/hello</code> (where <code>&lt;protocol&gt;</code> is either <code>http</code> or <code>https</code> based on your setup, and <code>&lt;host&gt;</code> is the host or IP to your Trilium server instance). If you are running the TriliumNext application without a server, use <code>http://localhost:37840</code> as the base URL.</li><li>If everything went well, at the previous step the browser should have downloaded the file uploaded in the first step.</li></ol><p>Instead of <code>hello</code>, the name can be:</p><ul><li>A path, such as <code>fonts/Roboto.ttf</code>, which would be accessible via <code>&lt;host&gt;/custom/fonts/Roboto.ttf</code>.</li><li>As a more advanced use case, a regular expression to match multiple routes, such as <code>hello/.*</code> which will be accessible via <code>/custom/hello/1</code>, <code>/custom/hello/2</code>, <code>/custom/hello/world</code>, etc.</li></ul><h2>Using it in a theme</h2><p>For example, if you have a custom font to be imported by the theme, first upload a font file into Trilium and assign it the <code>#customResourceProvider=fonts/myfont.ttf</code> attribute.</p><p>Then modify the theme CSS to point to:</p><pre><code class=\"language-text-css\">@font-face {\n\tfont-family: customFont;\n\tsrc: url(\"/custom/fonts/myfont.ttf\");\n}\n\ndiv {\n\tfont-family: customFont;\n}</code></pre>",
"_help_pgxEVkzLl1OP": "<aside class=\"admonition tip\"><p>For a quick start, consult the&nbsp;<a class=\"reference-link\" href=\"#root/_help_9qPsTWBorUhQ\">API Reference</a>.</p></aside><p>ETAPI is Trilium's public/external REST API. It is available since Trilium v0.50.</p><h2>API clients</h2><p>As an alternative to calling the API directly, there are client libraries to simplify this</p><ul><li><a href=\"https://github.com/Nriver/trilium-py\">trilium-py</a>, you can use Python to communicate with Trilium.</li></ul><h2>Obtaining a token</h2><p>All operations with the REST API have to be authenticated using a token. You can get this token either from Options -&gt; ETAPI or programmatically using the <code>/auth/login</code> REST call (see the <a href=\"https://github.com/TriliumNext/Trilium/blob/master/src/etapi/etapi.openapi.yaml\">spec</a>).</p><h2>Authentication</h2><h3>Via the <code>Authorization</code> header</h3><pre><code class=\"language-text-x-trilium-auto\">GET https://myserver.com/etapi/app-info\nAuthorization: ETAPITOKEN</code></pre><p>where <code>ETAPITOKEN</code> is the token obtained in the previous step.</p><p>For compatibility with various tools, it's also possible to specify the value of the <code>Authorization</code> header in the format <code>Bearer ETAPITOKEN</code> (since 0.93.0).</p><h3>Basic authentication</h3><p>Since v0.56 you can also use basic auth format:</p><pre><code class=\"language-text-x-trilium-auto\">GET https://myserver.com/etapi/app-info\nAuthorization: Basic BATOKEN</code></pre><ul><li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is a standard Basic Auth serialization</li><li>Where <code>username</code> is \"etapi\"</li><li>And <code>password</code> is the generated ETAPI token described above.</li></ul><p>Basic Auth is meant to be used with tools which support only basic auth.</p><h2>Interaction using Bash scripts</h2><p>It is possible to write simple Bash scripts to interact with Trilium. As an example, here's how to obtain the HTML content of a note:</p><pre><code class=\"language-text-x-trilium-auto\">#!/usr/bin/env bash\n\n# Configuration\nTOKEN=z1vA4fkGxjOR_ZXLrZeqHEFOv65yV3882iFCRtNIK9k9iWrHliITNSLQ=\nSERVER=http://localhost:8080\n\n# Download a note by ID\nNOTE_ID=\"i6ra4ZshJhgN\"\ncurl \"$SERVER/etapi/notes/$NOTE_ID/content\" -H \"Authorization: $TOKEN\" </code></pre><p>Make sure to replace the values of:</p><ul><li><code>TOKEN</code> with your ETAPI token.</li><li><code>SERVER</code> with the correct protocol, host name and port to your Trilium instance.</li><li><code>NOTE_ID</code> with an existing note ID to download.</li></ul><p>As another example, to obtain a .zip export of a note and place it in a directory called <code>out</code>, simply replace the last statement in the script with:</p><pre><code class=\"language-text-x-trilium-auto\">curl -H \"Authorization: $TOKEN\" \\\n\t-X GET \"$SERVER/etapi/notes/$NOTE_ID/export\" \\\n --output \"out/$NOTE_ID.zip\"</code></pre><h2>Uploading binary content</h2><p>A JSON request body can only carry text, so the <code>content</code> field of <code>POST /etapi/attachments</code> stores exactly the string it receives. To upload an image, a PDF or any other binary file, send the raw bytes to the content endpoint with the <code>application/octet-stream</code> content type. The same applies to the content of a note (<code>PUT /etapi/notes/{noteId}/content</code>).</p><p>To attach a file to a note, create the attachment without content, then upload the file to it:</p><pre><code class=\"language-text-x-trilium-auto\">ATTACHMENT_ID=$(curl -s -X POST \"$SERVER/etapi/attachments\" \\\n -H \"Authorization: $TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d \"{\\\"ownerId\\\": \\\"$NOTE_ID\\\", \\\"role\\\": \\\"file\\\", \\\"mime\\\": \\\"application/pdf\\\", \\\"title\\\": \\\"report.pdf\\\", \\\"position\\\": 10}\" \\\n | jq -r .attachmentId)\n\ncurl -X PUT \"$SERVER/etapi/attachments/$ATTACHMENT_ID/content\" \\\n -H \"Authorization: $TOKEN\" \\\n -H \"Content-Type: application/octet-stream\" \\\n --data-binary @report.pdf</code></pre><p>Use <code>--data-binary</code> rather than <code>-d</code>, which strips line breaks from the file. For an image, set <code>role</code> to <code>image</code> and <code>mime</code> to the image's type, such as <code>image/png</code>.</p>",
- "_help_9qPsTWBorUhQ": "<p>External Trilium API</p><h2>Authentication</h2><h3><code>EtapiTokenAuth</code></h3><p>API key in the <code>Authorization</code> header.</p><h3><code>EtapiBasicAuth</code></h3><p>HTTP <code>basic</code> authentication.</p><p>Basic Auth where username is arbitrary string (e.g. \"trilium\", not checked), username is the ETAPI token. To emphasize, do not use Trilium password here (won't work), only the generated ETAPI token (from Options -&gt; ETAPI)</p><h2>Notes</h2><p>Notes and their content, and the import and export of whole subtrees.</p><h3>Create a note</h3><p><code>POST /create-note</code> · <code>createNote</code></p><p>Create a note and place it into the note tree</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>CreateNoteDef</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td>Note ID of the parent note in the tree</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td><td></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>book</code>, <code>relationMap</code>, <code>render</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td>this needs to be specified only for note types 'code', 'file', 'image'.</td></tr><tr><td><code>content</code> <br><em>required</em></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer</code></td><td>Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td>Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix.</td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td>true if this note (as a folder) should appear expanded</td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>DON'T specify unless you want to force a specific noteId</td></tr><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td>DON'T specify unless you want to force a specific branchId</td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td>Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset).</td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td>UTC timestap of the note creation. Specify only if you want to override the default (current datetime).</td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime).</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"application/json\",\n \"content\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true,\n \"noteId\": \"evnnmvHTCgIn\",\n \"branchId\": \"evnnmvHTCgIn\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>NoteWithBranch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td><td></td></tr><tr><td><code>branch</code></td><td><code>Branch</code></td><td>Branch places the note into the tree, it represents the relationship between a parent note and child note</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"note\": {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n },\n \"branch\": {\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Search notes</h3><p><code>GET /notes</code> · <code>searchNotes</code></p><p>Search notes</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>search</code> <br><em>required</em></td><td><code>string</code></td><td>search query string as described in <a href=\"https://triliumnext.github.io/Docs/Wiki/search.html\">https://triliumnext.github.io/Docs/Wiki/search.html</a></td></tr><tr><td><code>fastSearch</code></td><td><code>boolean</code></td><td>enable fast search (fulltext doesn't look into content)</td></tr><tr><td><code>includeArchivedNotes</code></td><td><code>boolean</code></td><td>search by default ignores archived notes. Set to 'true' to includes archived notes into search results.</td></tr><tr><td><code>ancestorNoteId</code></td><td><code>EntityId</code></td><td>search only in a subtree identified by the subtree noteId. By default whole tree is searched.</td></tr><tr><td><code>ancestorDepth</code></td><td><code>string</code></td><td>define how deep in the tree should the notes be searched</td></tr><tr><td><code>orderBy</code></td><td><code>string</code></td><td>name of the property/label to order search results by</td></tr><tr><td><code>orderDirection</code></td><td><code>string</code></td><td>order direction, ascending or descending. One of <code>asc</code>, <code>desc</code>.</td></tr><tr><td><code>limit</code></td><td><code>integer</code></td><td>limit the number of results you want to receive</td></tr><tr><td><code>debug</code></td><td><code>boolean</code></td><td>set to true to get debug information in the response (search query parsing)</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: search response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>SearchResponse</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>results</code> <br><em>required</em></td><td><code>array of Note</code></td><td></td></tr><tr><td><code>debugInfo</code></td><td><code>object</code></td><td>debugging info on parsing the search query enabled with &amp;debug=true parameter</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"results\": [\n {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"debugInfo\": {}\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a note</h3><p><code>GET /notes/{noteId}</code> · <code>getNoteById</code></p><p>Returns a note identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete a note</h3><p><code>DELETE /notes/{noteId}</code> · <code>deleteNoteById</code></p><p>deletes a single note based on the noteId supplied</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: note deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update a note</h3><p><code>PATCH /notes/{noteId}</code> · <code>patchNoteById</code></p><p>patch a note identified by the noteId with changes in the body</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"blobId\": \"string\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the content of a note</h3><p><code>GET /notes/{noteId}/content</code> · <code>getNoteContent</code></p><p>Returns note content identified by its ID. The response carries the note's MIME type as its <code>Content-Type</code>.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note content</p><div class=\"trilium-tab-panel\"><ul><li><code>*/*</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Replace the content of a note</h3><p><code>PUT /notes/{noteId}/content</code> · <code>putNoteContentById</code></p><p>Updates note content identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><p>New content of the note. Send text (such as the HTML of a text note) as <code>text/plain</code> and binary data (such as the file of an image or file note) as <code>application/octet-stream</code>; other content types are not accepted.</p><ul><li><code>text/plain</code>: <code>string</code></li><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: note content updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Export a subtree</h3><p><code>GET /notes/{noteId}/export</code> · <code>exportNoteSubtree</code></p><p>Exports ZIP file export of a given note subtree. To export whole document, use \"root\" for noteId</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>any</code></td><td>One of <code>html</code>, <code>markdown</code>, <code>share</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: export ZIP file</p><div class=\"trilium-tab-panel\"><ul><li><code>application/zip</code>: <code>string (binary)</code></li></ul></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Import a ZIP archive</h3><p><code>POST /notes/{noteId}/import</code> · <code>importZip</code></p><p>Imports ZIP file into a given note.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>NoteWithBranch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td><td></td></tr><tr><td><code>branch</code></td><td><code>Branch</code></td><td>Branch places the note into the tree, it represents the relationship between a parent note and child note</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"note\": {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n },\n \"branch\": {\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Restore a deleted note</h3><p><code>POST /notes/{noteId}/undelete</code> · <code>undeleteNote</code></p><p>Restore a deleted note. The note must be deleted and must have at least one undeleted parent.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note restored successfully</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>List recent changes</h3><p><code>GET /notes/history</code> · <code>getNoteHistory</code></p><p>Returns recent changes including note creations, modifications, and deletions</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>ancestorNoteId</code></td><td><code>EntityId</code></td><td>Limit changes to a subtree identified by this note ID. Defaults to \"root\" (all notes).</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: list of recent changes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>array of RecentChange</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"current_title\": \"string\",\n \"current_isDeleted\": true,\n \"current_deleteId\": \"string\",\n \"current_isProtected\": true,\n \"utcDate\": \"2021-12-31 19:18:11.930Z\",\n \"date\": \"2021-12-31 20:18:11.930+0100\",\n \"canBeUndeleted\": true\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Branches</h2><p>Branches place a note in the tree, under a parent note.</p><h3>Create a branch</h3><p><code>POST /branches</code> · <code>postBranch</code></p><p>Create a branch (clone a note to a different location in the tree). In case there is a branch between parent note and child note already, then this will update the existing branch with prefix, notePosition and isExpanded.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: existing branch updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: branch created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a branch</h3><p><code>GET /branches/{branchId}</code> · <code>getBranchById</code></p><p>Returns a branch identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: branch response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete a branch</h3><p><code>DELETE /branches/{branchId}</code> · <code>deleteBranchById</code></p><p>deletes a branch based on the branchId supplied. If this is the last branch of the (child) note, then the note is deleted as well.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: branch deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update a branch</h3><p><code>PATCH /branches/{branchId}</code> · <code>patchBranchById</code></p><p>patch a branch identified by the branchId with changes in the body. Only prefix and notePosition can be updated. If you want to update other properties, you need to delete the old branch and create a new one.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: branch updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Refresh the order of child notes</h3><p><code>POST /refresh-note-ordering/{parentNoteId}</code> · <code>postRefreshNoteOrdering</code></p><p>notePositions in branches are not automatically pushed to connected clients and need a specific instruction. If you want your changes to be in effect immediately, call this service after setting branches' notePosition. Note that you need to supply \"parentNoteId\" of branch(es) with changed positions.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: note ordering refreshed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Attributes</h2><p>Labels and relations of a note.</p><h3>Create an attribute</h3><p><code>POST /attributes</code> · <code>postAttribute</code></p><p>create an attribute for a given note</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: attribute created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get an attribute</h3><p><code>GET /attributes/{attributeId}</code> · <code>getAttributeById</code></p><p>Returns an attribute identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attribute response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete an attribute</h3><p><code>DELETE /attributes/{attributeId}</code> · <code>deleteAttributeById</code></p><p>deletes an attribute based on the attributeId supplied.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: attribute deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update an attribute</h3><p><code>PATCH /attributes/{attributeId}</code> · <code>patchAttributeById</code></p><p>patch an attribute identified by the attributeId with changes in the body. For labels, only value and position can be updated. For relations, only position can be updated. If you want to modify other properties, you need to delete the old attribute and create a new one.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attribute updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Attachments</h2><p>Files attached to a note.</p><h3>List the attachments of a note</h3><p><code>GET /notes/{noteId}/attachments</code> · <code>getNoteAttachments</code></p><p>Returns all attachments for a note identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: list of attachments</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>array of Attachment</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Create an attachment</h3><p><code>POST /attachments</code> · <code>postAttachment</code></p><p>create an attachment</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>CreateAttachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td></td></tr><tr><td><code>content</code></td><td><code>string</code></td><td>Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with <code>PUT /attachments/{attachmentId}/content</code>.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"content\": \"string\",\n \"position\": 0\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: attachment created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get an attachment</h3><p><code>GET /attachments/{attachmentId}</code> · <code>getAttachmentById</code></p><p>Returns an attachment identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attachment response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete an attachment</h3><p><code>DELETE /attachments/{attachmentId}</code> · <code>deleteAttachmentById</code></p><p>deletes an attachment based on the attachmentId supplied.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: attachment deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update an attachment</h3><p><code>PATCH /attachments/{attachmentId}</code> · <code>patchAttachmentById</code></p><p>patch an attachment identified by the attachmentId with changes in the body. Only role, mime, title, and position are patchable.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"contentLength\": 0\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attribute updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the content of an attachment</h3><p><code>GET /attachments/{attachmentId}/content</code> · <code>getAttachmentContent</code></p><p>Returns attachment content identified by its ID. The response carries the attachment's MIME type as its <code>Content-Type</code>.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attachment content</p><div class=\"trilium-tab-panel\"><ul><li><code>*/*</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Replace the content of an attachment</h3><p><code>PUT /attachments/{attachmentId}/content</code> · <code>putAttachmentContentById</code></p><p>Updates attachment content identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><p>New content of the attachment. Send text as <code>text/plain</code> and binary data (such as an image or a PDF) as <code>application/octet-stream</code>; other content types are not accepted.</p><ul><li><code>text/plain</code>: <code>string</code></li><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: attachment content updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Revisions</h2><p>Snapshots of a note's content.</p><h3>Create a revision</h3><p><code>POST /notes/{noteId}/revision</code> · <code>createRevision</code></p><p>Create a note revision for the given note</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>any</code></td><td>One of <code>html</code>, <code>markdown</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: revision has been created</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>List the revisions of a note</h3><p><code>GET /notes/{noteId}/revisions</code> · <code>getNoteRevisions</code></p><p>Returns the revisions of a note identified by its ID. Protected revisions are omitted, since they cannot be read through ETAPI individually either.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: list of revisions</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>array of Revision</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"revisionId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateLastEdited\": \"2021-12-31 20:18:11.930+0100\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateLastEdited\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a revision</h3><p><code>GET /revisions/{revisionId}</code> · <code>getRevisionById</code></p><p>Returns a revision identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: revision response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Revision</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateLastEdited</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateLastEdited</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"revisionId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateLastEdited\": \"2021-12-31 20:18:11.930+0100\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateLastEdited\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the content of a revision</h3><p><code>GET /revisions/{revisionId}/content</code> · <code>getRevisionContent</code></p><p>Returns revision content identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>EntityId</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: revision content response</p><div class=\"trilium-tab-panel\"><ul><li><code>text/html</code>: <code>string</code></li></ul></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Calendar</h2><p>Day, week, month and year notes of the journal, and the inbox note.</p><h3>Get the inbox note</h3><p><code>GET /inbox/{date}</code> · <code>getInboxNote</code></p><p>returns an \"inbox\" note, into which note can be created. Date will be used depending on whether the inbox is a fixed note (identified with #inbox label) or a day note in a journal. A database with neither returns the root note, and ignores the date, rather than creating a journal to hold a day note.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: inbox note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a day note</h3><p><code>GET /calendar/days/{date}</code> · <code>getDayNote</code></p><p>returns a day note for a given date. Gets created if doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: day note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the day note starting the week</h3><p><code>GET /calendar/week-first-day/{date}</code> · <code>getWeekFirstDayNote</code></p><p>Returns the day note for the first day of the week containing the given date, honouring the configured first day of week. The note is created if it doesn't exist. This returns a day note, not a week note, so unlike /calendar/weeks/{week} it does not require the enableWeekNote label on the calendar root.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td><td>Any date within the week, in the format YYYY-MM-DD.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: day note starting the week</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a week note</h3><p><code>GET /calendar/weeks/{week}</code> · <code>getWeekNote</code></p><p>Returns a week note for a given ISO week (format YYYY-Www, e.g., 2025-W01). The note is created if it doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>week</code> <br><em>required</em></td><td><code>string</code></td><td>The ISO 8601 week identifier (YYYY-Www).</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: week note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a month note</h3><p><code>GET /calendar/months/{month}</code> · <code>getMonthNote</code></p><p>Returns a month note for a given month (format YYYY-MM, e.g., 2022-02). The note is created if it doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>month</code> <br><em>required</em></td><td><code>string</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: month note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a year note</h3><p><code>GET /calendar/years/{year}</code> · <code>getYearNote</code></p><p>Returns a year note for a given year (format YYYY, e.g., 2022). The note is created if it doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>year</code> <br><em>required</em></td><td><code>string</code></td><td></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: year note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Tokens</h2><p>Obtaining and revoking ETAPI tokens with the password.</p><h3>Log in</h3><p><code>POST /auth/login</code> · <code>login</code></p><p>get an ETAPI token based on password for further use with ETAPI. Too many requests from one IP address within a short time, such as failed logins, block that address for a while.</p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code></td><td><code>string</code></td><td>user's password used to e.g. login to Trilium server and/or protect notes</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"password\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: auth token</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>authToken</code></td><td><code>string</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"authToken\": \"Bc4bFn0Ffiok_4NpbVCDnFz7B2WU+pdhW8B5Ne3DiR5wXrEyqdjgRIsk=\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">429: too many requests</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Log out</h3><p><code>POST /auth/logout</code> · <code>logout</code></p><p>logout (delete/deactivate) an ETAPI token</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: logout successful</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Application</h2><p>Information about the instance, backups and metrics.</p><h3>Get application info</h3><p><code>GET /app-info</code> · <code>getAppInfo</code></p><p>returns information about the running Trilium instance</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: app info</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>AppInfo</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>appVersion</code></td><td><code>string</code></td><td>Trilium version</td></tr><tr><td><code>dbVersion</code></td><td><code>integer (int32)</code></td><td>DB version</td></tr><tr><td><code>syncVersion</code></td><td><code>integer (int32)</code></td><td>Sync protocol version</td></tr><tr><td><code>buildDate</code></td><td><code>string (date-time)</code></td><td>build date</td></tr><tr><td><code>buildRevision</code></td><td><code>string</code></td><td>git build revision</td></tr><tr><td><code>dataDirectory</code></td><td><code>string</code></td><td>data directory where Trilium stores files</td></tr><tr><td><code>clipperProtocolVersion</code></td><td><code>string</code></td><td>version of the supported Trilium Web Clipper protocol</td></tr><tr><td><code>utcDateTime</code></td><td><code>string</code></td><td>current UTC date time</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"appVersion\": \"0.50.2\",\n \"dbVersion\": 194,\n \"syncVersion\": 25,\n \"buildDate\": \"2022-02-09T22:52:36+01:00\",\n \"buildRevision\": \"23daaa2387a0655685377f0a541d154aeec2aae8\",\n \"dataDirectory\": \"/home/user/data\",\n \"clipperProtocolVersion\": 1.1,\n \"utcDateTime\": \"2022-03-07T21:54:25.277Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Create a backup</h3><p><code>PUT /backup/{backupName}</code> · <code>createBackup</code></p><p>Create a database backup under a given name</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>backupName</code> <br><em>required</em></td><td><code>StringId</code></td><td>If the backupName is e.g. \"now\", then the backup will be written to \"backup-now.db\" file</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: backup has been created</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get instance metrics</h3><p><code>GET /metrics</code> · <code>getMetrics</code></p><p>Returns instance and database metrics for monitoring: note, attachment, revision, branch, attribute and blob counts, note and attachment type breakdowns, version information and database size. Counts only — no note titles, content or attributes.</p><p>The same data is served by GET /api/metrics to the web session.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>string</code></td><td>Response format. Defaults to Prometheus text. One of <code>prometheus</code>, <code>json</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: instance metrics</p><div class=\"trilium-tab-panel\"><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>text/plain</code>: <code>string</code></p><div class=\"trilium-tab-panel\"><pre><code class=\"language-text-x-trilium-auto\"># HELP trilium_info Trilium instance information\n# TYPE trilium_info gauge\ntrilium_info{version=\"0.99.3\",db_version=\"231\"} 1 1701432000\n\n# HELP trilium_notes_total Total number of notes including deleted\n# TYPE trilium_notes_total gauge\ntrilium_notes_total 1234 1701432000</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>application/json</code>: <code>Metrics</code></p><div class=\"trilium-tab-panel\"><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>version</code></td><td><code>object</code></td><td></td></tr><tr><td><code>database</code></td><td><code>object</code></td><td></td></tr><tr><td><code>noteTypes</code></td><td><code>object</code></td><td>Number of active notes per note type</td></tr><tr><td><code>attachmentTypes</code></td><td><code>object</code></td><td>Number of active attachments per MIME type</td></tr><tr><td><code>statistics</code></td><td><code>object</code></td><td></td></tr><tr><td><code>timestamp</code></td><td><code>string</code></td><td></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"version\": {\n \"app\": \"0.99.3\",\n \"db\": 231,\n \"node\": \"v22.14.0\",\n \"sync\": 35,\n \"buildDate\": \"2024-09-07T18:36:34Z\",\n \"buildRevision\": \"7c0d6930fa8f20d269dcfbcbc8f636a25f6bb9a7\"\n },\n \"database\": {\n \"totalNotes\": 0,\n \"deletedNotes\": 0,\n \"activeNotes\": 0,\n \"protectedNotes\": 0,\n \"totalAttachments\": 0,\n \"deletedAttachments\": 0,\n \"activeAttachments\": 0,\n \"totalRevisions\": 0,\n \"totalBranches\": 0,\n \"totalAttributes\": 0,\n \"totalBlobs\": 0,\n \"totalEtapiTokens\": 0,\n \"totalRecentNotes\": 0\n },\n \"noteTypes\": {\n \"text\": 800,\n \"code\": 200\n },\n \"attachmentTypes\": {\n \"image/png\": 45,\n \"application/pdf\": 14\n },\n \"statistics\": {\n \"oldestNote\": \"string\",\n \"newestNote\": \"string\",\n \"lastModified\": \"string\",\n \"databaseSizeBytes\": 0\n },\n \"timestamp\": \"2024-12-01T12:00:00.000Z\"\n}</code></pre></div></div></div></section></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Schemas</h2><h3><code>CreateNoteDef</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>EntityId</code></td><td>Note ID of the parent note in the tree</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td><td></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>book</code>, <code>relationMap</code>, <code>render</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td>this needs to be specified only for note types 'code', 'file', 'image'.</td></tr><tr><td><code>content</code> <br><em>required</em></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer</code></td><td>Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td>Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix.</td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td>true if this note (as a folder) should appear expanded</td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>DON'T specify unless you want to force a specific noteId</td></tr><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td>DON'T specify unless you want to force a specific branchId</td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td>Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset).</td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td>UTC timestap of the note creation. Specify only if you want to override the default (current datetime).</td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime).</td></tr></tbody></table></figure><h3><code>Note</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td><td></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure><h3><code>Branch</code></h3><p>Branch places the note into the tree, it represents the relationship between a parent note and child note</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code></td><td>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td><td></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure><h3><code>NoteWithBranch</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td><td></td></tr><tr><td><code>branch</code></td><td><code>Branch</code></td><td>Branch places the note into the tree, it represents the relationship between a parent note and child note</td></tr></tbody></table></figure><h3><code>Attachment</code></h3><p>Attachment is owned by a note, has title and content</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure><h3><code>CreateAttachment</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>ownerId</code></td><td><code>EntityId</code></td><td>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td><td></td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td></td></tr><tr><td><code>content</code></td><td><code>string</code></td><td>Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with <code>PUT /attachments/{attachmentId}/content</code>.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure><h3><code>Attribute</code></h3><p>Attribute (Label, Relation) is a key-value record attached to a note.</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td></td></tr><tr><td><code>value</code></td><td><code>string</code></td><td></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td><td></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr></tbody></table></figure><h3><code>AttributeList</code></h3><p>Type: <code>array of Attribute</code></p><h3><code>SearchResponse</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>results</code> <br><em>required</em></td><td><code>array of Note</code></td><td></td></tr><tr><td><code>debugInfo</code></td><td><code>object</code></td><td>debugging info on parsing the search query enabled with &amp;debug=true parameter</td></tr></tbody></table></figure><h3><code>EntityId</code></h3><p>Type: <code>string</code></p><h3><code>StringId</code></h3><p>Type: <code>string</code></p><h3><code>EntityIdList</code></h3><p>Type: <code>array of EntityId</code></p><h3><code>LocalDateTime</code></h3><p>Type: <code>string</code></p><h3><code>UtcDateTime</code></h3><p>Type: <code>string</code></p><h3><code>AppInfo</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>appVersion</code></td><td><code>string</code></td><td>Trilium version</td></tr><tr><td><code>dbVersion</code></td><td><code>integer (int32)</code></td><td>DB version</td></tr><tr><td><code>syncVersion</code></td><td><code>integer (int32)</code></td><td>Sync protocol version</td></tr><tr><td><code>buildDate</code></td><td><code>string (date-time)</code></td><td>build date</td></tr><tr><td><code>buildRevision</code></td><td><code>string</code></td><td>git build revision</td></tr><tr><td><code>dataDirectory</code></td><td><code>string</code></td><td>data directory where Trilium stores files</td></tr><tr><td><code>clipperProtocolVersion</code></td><td><code>string</code></td><td>version of the supported Trilium Web Clipper protocol</td></tr><tr><td><code>utcDateTime</code></td><td><code>string</code></td><td>current UTC date time</td></tr></tbody></table></figure><h3><code>Error</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code></td><td>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code></td><td>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td><td>Human readable error, potentially with more details,</td></tr></tbody></table></figure><h3><code>Revision</code></h3><p>Revision represents a snapshot of note's title and content at some point in the past.</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>type</code></td><td><code>string</code></td><td>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td><td></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td><td>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateLastEdited</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td><td></td></tr><tr><td><code>utcDateLastEdited</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td><td></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td><td></td></tr></tbody></table></figure><h3><code>RecentChange</code></h3><p>Represents a recent change event (creation, modification, or deletion).</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td><td></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Title at the time of the change (may be \"[protected]\" for protected notes)</td></tr><tr><td><code>current_title</code></td><td><code>string</code></td><td>Current title of the note (may be \"[protected]\" for protected notes)</td></tr><tr><td><code>current_isDeleted</code></td><td><code>boolean</code></td><td>Whether the note is currently deleted</td></tr><tr><td><code>current_deleteId</code></td><td><code>string</code></td><td>Delete ID if the note is deleted</td></tr><tr><td><code>current_isProtected</code></td><td><code>boolean</code></td><td>Whether the note is protected</td></tr><tr><td><code>utcDate</code></td><td><code>UtcDateTime</code></td><td>UTC timestamp of the change</td></tr><tr><td><code>date</code></td><td><code>LocalDateTime</code></td><td>Local timestamp of the change</td></tr><tr><td><code>canBeUndeleted</code></td><td><code>boolean</code></td><td>Whether the note can be undeleted (only present for deleted notes)</td></tr></tbody></table></figure><h3><code>Metrics</code></h3><p>Instance and database metrics, as served by GET /etapi/metrics?format=json</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>version</code></td><td><code>object</code></td><td></td></tr><tr><td><code>database</code></td><td><code>object</code></td><td></td></tr><tr><td><code>noteTypes</code></td><td><code>object</code></td><td>Number of active notes per note type</td></tr><tr><td><code>attachmentTypes</code></td><td><code>object</code></td><td>Number of active attachments per MIME type</td></tr><tr><td><code>statistics</code></td><td><code>object</code></td><td></td></tr><tr><td><code>timestamp</code></td><td><code>string</code></td><td></td></tr></tbody></table></figure>",
+ "_help_9qPsTWBorUhQ": "<p>External Trilium API</p><h2>Authentication</h2><h3><code>EtapiTokenAuth</code></h3><p>API key in the <code>Authorization</code> header.</p><h3><code>EtapiBasicAuth</code></h3><p>HTTP <code>basic</code> authentication.</p><p>Basic Auth where username is arbitrary string (e.g. \"trilium\", not checked), username is the ETAPI token. To emphasize, do not use Trilium password here (won't work), only the generated ETAPI token (from Options -&gt; ETAPI)</p><h2>Notes</h2><p>Notes and their content, and the import and export of whole subtrees.</p><h3>Create a note</h3><p><code>POST /create-note</code> · <code>createNote</code></p><p>Create a note and place it into the note tree</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>CreateNoteDef</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>EntityId</code> <br>Note ID of the parent note in the tree</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>book</code>, <code>relationMap</code>, <code>render</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code> <br>this needs to be specified only for note types 'code', 'file', 'image'.</td></tr><tr><td><code>content</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer</code> <br>Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000</td></tr><tr><td><code>prefix</code></td><td><code>string</code> <br>Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix.</td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code> <br>true if this note (as a folder) should appear expanded</td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>DON'T specify unless you want to force a specific noteId</td></tr><tr><td><code>branchId</code></td><td><code>EntityId</code> <br>DON'T specify unless you want to force a specific branchId</td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code> <br>Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset).</td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code> <br>UTC timestap of the note creation. Specify only if you want to override the default (current datetime).</td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime).</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"application/json\",\n \"content\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true,\n \"noteId\": \"evnnmvHTCgIn\",\n \"branchId\": \"evnnmvHTCgIn\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>NoteWithBranch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td></tr><tr><td><code>branch</code></td><td><code>Branch</code> <br>Branch places the note into the tree, it represents the relationship between a parent note and child note</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"note\": {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n },\n \"branch\": {\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Search notes</h3><p><code>GET /notes</code> · <code>searchNotes</code></p><p>Search notes</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>search</code> <br><em>required</em></td><td><code>string</code> <br>search query string as described in <a href=\"https://triliumnext.github.io/Docs/Wiki/search.html\">https://triliumnext.github.io/Docs/Wiki/search.html</a></td></tr><tr><td><code>fastSearch</code></td><td><code>boolean</code> <br>enable fast search (fulltext doesn't look into content)</td></tr><tr><td><code>includeArchivedNotes</code></td><td><code>boolean</code> <br>search by default ignores archived notes. Set to 'true' to includes archived notes into search results.</td></tr><tr><td><code>ancestorNoteId</code></td><td><code>EntityId</code> <br>search only in a subtree identified by the subtree noteId. By default whole tree is searched.</td></tr><tr><td><code>ancestorDepth</code></td><td><code>string</code> <br>define how deep in the tree should the notes be searched</td></tr><tr><td><code>orderBy</code></td><td><code>string</code> <br>name of the property/label to order search results by</td></tr><tr><td><code>orderDirection</code></td><td><code>string</code> <br>order direction, ascending or descending. One of <code>asc</code>, <code>desc</code>.</td></tr><tr><td><code>limit</code></td><td><code>integer</code> <br>limit the number of results you want to receive</td></tr><tr><td><code>debug</code></td><td><code>boolean</code> <br>set to true to get debug information in the response (search query parsing)</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: search response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>SearchResponse</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>results</code> <br><em>required</em></td><td><code>array of Note</code></td></tr><tr><td><code>debugInfo</code></td><td><code>object</code> <br>debugging info on parsing the search query enabled with &amp;debug=true parameter</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"results\": [\n {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"debugInfo\": {}\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a note</h3><p><code>GET /notes/{noteId}</code> · <code>getNoteById</code></p><p>Returns a note identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete a note</h3><p><code>DELETE /notes/{noteId}</code> · <code>deleteNoteById</code></p><p>deletes a single note based on the noteId supplied</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: note deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update a note</h3><p><code>PATCH /notes/{noteId}</code> · <code>patchNoteById</code></p><p>patch a note identified by the noteId with changes in the body</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"blobId\": \"string\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the content of a note</h3><p><code>GET /notes/{noteId}/content</code> · <code>getNoteContent</code></p><p>Returns note content identified by its ID. The response carries the note's MIME type as its <code>Content-Type</code>.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note content</p><div class=\"trilium-tab-panel\"><ul><li><code>*/*</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Replace the content of a note</h3><p><code>PUT /notes/{noteId}/content</code> · <code>putNoteContentById</code></p><p>Updates note content identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><p>New content of the note. Send text (such as the HTML of a text note) as <code>text/plain</code> and binary data (such as the file of an image or file note) as <code>application/octet-stream</code>; other content types are not accepted.</p><ul><li><code>text/plain</code>: <code>string</code></li><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: note content updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Export a subtree</h3><p><code>GET /notes/{noteId}/export</code> · <code>exportNoteSubtree</code></p><p>Exports ZIP file export of a given note subtree. To export whole document, use \"root\" for noteId</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>any</code> <br>One of <code>html</code>, <code>markdown</code>, <code>share</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: export ZIP file</p><div class=\"trilium-tab-panel\"><ul><li><code>application/zip</code>: <code>string (binary)</code></li></ul></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Import a ZIP archive</h3><p><code>POST /notes/{noteId}/import</code> · <code>importZip</code></p><p>Imports ZIP file into a given note.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>NoteWithBranch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td></tr><tr><td><code>branch</code></td><td><code>Branch</code> <br>Branch places the note into the tree, it represents the relationship between a parent note and child note</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"note\": {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n },\n \"branch\": {\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Restore a deleted note</h3><p><code>POST /notes/{noteId}/undelete</code> · <code>undeleteNote</code></p><p>Restore a deleted note. The note must be deleted and must have at least one undeleted parent.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: note restored successfully</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>List recent changes</h3><p><code>GET /notes/history</code> · <code>getNoteHistory</code></p><p>Returns recent changes including note creations, modifications, and deletions</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>ancestorNoteId</code></td><td><code>EntityId</code> <br>Limit changes to a subtree identified by this note ID. Defaults to \"root\" (all notes).</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: list of recent changes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>array of RecentChange</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"current_title\": \"string\",\n \"current_isDeleted\": true,\n \"current_deleteId\": \"string\",\n \"current_isProtected\": true,\n \"utcDate\": \"2021-12-31 19:18:11.930Z\",\n \"date\": \"2021-12-31 20:18:11.930+0100\",\n \"canBeUndeleted\": true\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Branches</h2><p>Branches place a note in the tree, under a parent note.</p><h3>Create a branch</h3><p><code>POST /branches</code> · <code>postBranch</code></p><p>Create a branch (clone a note to a different location in the tree). In case there is a branch between parent note and child note already, then this will update the existing branch with prefix, notePosition and isExpanded.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: existing branch updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: branch created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a branch</h3><p><code>GET /branches/{branchId}</code> · <code>getBranchById</code></p><p>Returns a branch identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: branch response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete a branch</h3><p><code>DELETE /branches/{branchId}</code> · <code>deleteBranchById</code></p><p>deletes a branch based on the branchId supplied. If this is the last branch of the (child) note, then the note is deleted as well.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: branch deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update a branch</h3><p><code>PATCH /branches/{branchId}</code> · <code>patchBranchById</code></p><p>patch a branch identified by the branchId with changes in the body. Only prefix and notePosition can be updated. If you want to update other properties, you need to delete the old branch and create a new one.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: branch updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"parentNoteId\": \"evnnmvHTCgIn\",\n \"prefix\": \"string\",\n \"notePosition\": 0,\n \"isExpanded\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Refresh the order of child notes</h3><p><code>POST /refresh-note-ordering/{parentNoteId}</code> · <code>postRefreshNoteOrdering</code></p><p>notePositions in branches are not automatically pushed to connected clients and need a specific instruction. If you want your changes to be in effect immediately, call this service after setting branches' notePosition. Note that you need to supply \"parentNoteId\" of branch(es) with changed positions.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: note ordering refreshed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Attributes</h2><p>Labels and relations of a note.</p><h3>Create an attribute</h3><p><code>POST /attributes</code> · <code>postAttribute</code></p><p>create an attribute for a given note</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: attribute created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get an attribute</h3><p><code>GET /attributes/{attributeId}</code> · <code>getAttributeById</code></p><p>Returns an attribute identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attribute response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete an attribute</h3><p><code>DELETE /attributes/{attributeId}</code> · <code>deleteAttributeById</code></p><p>deletes an attribute based on the attributeId supplied.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: attribute deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update an attribute</h3><p><code>PATCH /attributes/{attributeId}</code> · <code>patchAttributeById</code></p><p>patch an attribute identified by the attributeId with changes in the body. For labels, only value and position can be updated. For relations, only position can be updated. If you want to modify other properties, you need to delete the old attribute and create a new one.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attribute updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Attachments</h2><p>Files attached to a note.</p><h3>List the attachments of a note</h3><p><code>GET /notes/{noteId}/attachments</code> · <code>getNoteAttachments</code></p><p>Returns all attachments for a note identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: list of attachments</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>array of Attachment</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Create an attachment</h3><p><code>POST /attachments</code> · <code>postAttachment</code></p><p>create an attachment</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>CreateAttachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code> <br>Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with <code>PUT /attachments/{attachmentId}/content</code>.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"content\": \"string\",\n \"position\": 0\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: attachment created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get an attachment</h3><p><code>GET /attachments/{attachmentId}</code> · <code>getAttachmentById</code></p><p>Returns an attachment identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attachment response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Delete an attachment</h3><p><code>DELETE /attachments/{attachmentId}</code> · <code>deleteAttachmentById</code></p><p>deletes an attachment based on the attachmentId supplied.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: attachment deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Update an attachment</h3><p><code>PATCH /attachments/{attachmentId}</code> · <code>patchAttachmentById</code></p><p>patch an attachment identified by the attachmentId with changes in the body. Only role, mime, title, and position are patchable.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"contentLength\": 0\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attribute updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"evnnmvHTCgIn\",\n \"ownerId\": \"evnnmvHTCgIn\",\n \"role\": \"string\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"position\": 0,\n \"blobId\": \"string\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateScheduledForErasureSince\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the content of an attachment</h3><p><code>GET /attachments/{attachmentId}/content</code> · <code>getAttachmentContent</code></p><p>Returns attachment content identified by its ID. The response carries the attachment's MIME type as its <code>Content-Type</code>.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: attachment content</p><div class=\"trilium-tab-panel\"><ul><li><code>*/*</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Replace the content of an attachment</h3><p><code>PUT /attachments/{attachmentId}/content</code> · <code>putAttachmentContentById</code></p><p>Updates attachment content identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><p>New content of the attachment. Send text as <code>text/plain</code> and binary data (such as an image or a PDF) as <code>application/octet-stream</code>; other content types are not accepted.</p><ul><li><code>text/plain</code>: <code>string</code></li><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: attachment content updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Revisions</h2><p>Snapshots of a note's content.</p><h3>Create a revision</h3><p><code>POST /notes/{noteId}/revision</code> · <code>createRevision</code></p><p>Create a note revision for the given note</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>any</code> <br>One of <code>html</code>, <code>markdown</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: revision has been created</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>List the revisions of a note</h3><p><code>GET /notes/{noteId}/revisions</code> · <code>getNoteRevisions</code></p><p>Returns the revisions of a note identified by its ID. Protected revisions are omitted, since they cannot be read through ETAPI individually either.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: list of revisions</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>array of Revision</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"revisionId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateLastEdited\": \"2021-12-31 20:18:11.930+0100\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateLastEdited\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a revision</h3><p><code>GET /revisions/{revisionId}</code> · <code>getRevisionById</code></p><p>Returns a revision identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: revision response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Revision</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateLastEdited</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateLastEdited</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"revisionId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateLastEdited\": \"2021-12-31 20:18:11.930+0100\",\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateLastEdited\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\",\n \"contentLength\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the content of a revision</h3><p><code>GET /revisions/{revisionId}/content</code> · <code>getRevisionContent</code></p><p>Returns revision content identified by its ID</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>EntityId</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: revision content response</p><div class=\"trilium-tab-panel\"><ul><li><code>text/html</code>: <code>string</code></li></ul></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Calendar</h2><p>Day, week, month and year notes of the journal, and the inbox note.</p><h3>Get the inbox note</h3><p><code>GET /inbox/{date}</code> · <code>getInboxNote</code></p><p>returns an \"inbox\" note, into which note can be created. Date will be used depending on whether the inbox is a fixed note (identified with #inbox label) or a day note in a journal. A database with neither returns the root note, and ignores the date, rather than creating a journal to hold a day note.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: inbox note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a day note</h3><p><code>GET /calendar/days/{date}</code> · <code>getDayNote</code></p><p>returns a day note for a given date. Gets created if doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: day note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get the day note starting the week</h3><p><code>GET /calendar/week-first-day/{date}</code> · <code>getWeekFirstDayNote</code></p><p>Returns the day note for the first day of the week containing the given date, honouring the configured first day of week. The note is created if it doesn't exist. This returns a day note, not a week note, so unlike /calendar/weeks/{week} it does not require the enableWeekNote label on the calendar root.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code> <br>Any date within the week, in the format YYYY-MM-DD.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: day note starting the week</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a week note</h3><p><code>GET /calendar/weeks/{week}</code> · <code>getWeekNote</code></p><p>Returns a week note for a given ISO week (format YYYY-Www, e.g., 2025-W01). The note is created if it doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>week</code> <br><em>required</em></td><td><code>string</code> <br>The ISO 8601 week identifier (YYYY-Www).</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: week note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a month note</h3><p><code>GET /calendar/months/{month}</code> · <code>getMonthNote</code></p><p>Returns a month note for a given month (format YYYY-MM, e.g., 2022-02). The note is created if it doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>month</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: month note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get a year note</h3><p><code>GET /calendar/years/{year}</code> · <code>getYearNote</code></p><p>Returns a year note for a given year (format YYYY, e.g., 2022). The note is created if it doesn't exist.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>year</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: year note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"evnnmvHTCgIn\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"attributes\": [\n {\n \"attributeId\": \"evnnmvHTCgIn\",\n \"noteId\": \"evnnmvHTCgIn\",\n \"type\": \"label\",\n \"name\": \"shareCss\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true,\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n }\n ],\n \"parentNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childNoteIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"parentBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"childBranchIds\": [\n \"evnnmvHTCgIn\"\n ],\n \"dateCreated\": \"2021-12-31 20:18:11.930+0100\",\n \"dateModified\": \"2021-12-31 20:18:11.930+0100\",\n \"utcDateCreated\": \"2021-12-31 19:18:11.930Z\",\n \"utcDateModified\": \"2021-12-31 19:18:11.930Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Tokens</h2><p>Obtaining and revoking ETAPI tokens with the password.</p><h3>Log in</h3><p><code>POST /auth/login</code> · <code>login</code></p><p>get an ETAPI token based on password for further use with ETAPI. Too many requests from one IP address within a short time, such as failed logins, block that address for a while.</p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code></td><td><code>string</code> <br>user's password used to e.g. login to Trilium server and/or protect notes</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"password\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: auth token</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>authToken</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"authToken\": \"Bc4bFn0Ffiok_4NpbVCDnFz7B2WU+pdhW8B5Ne3DiR5wXrEyqdjgRIsk=\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">429: too many requests</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Log out</h3><p><code>POST /auth/logout</code> · <code>logout</code></p><p>logout (delete/deactivate) an ETAPI token</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: logout successful</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Application</h2><p>Information about the instance, backups and metrics.</p><h3>Get application info</h3><p><code>GET /app-info</code> · <code>getAppInfo</code></p><p>returns information about the running Trilium instance</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: app info</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>AppInfo</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>appVersion</code></td><td><code>string</code> <br>Trilium version</td></tr><tr><td><code>dbVersion</code></td><td><code>integer (int32)</code> <br>DB version</td></tr><tr><td><code>syncVersion</code></td><td><code>integer (int32)</code> <br>Sync protocol version</td></tr><tr><td><code>buildDate</code></td><td><code>string (date-time)</code> <br>build date</td></tr><tr><td><code>buildRevision</code></td><td><code>string</code> <br>git build revision</td></tr><tr><td><code>dataDirectory</code></td><td><code>string</code> <br>data directory where Trilium stores files</td></tr><tr><td><code>clipperProtocolVersion</code></td><td><code>string</code> <br>version of the supported Trilium Web Clipper protocol</td></tr><tr><td><code>utcDateTime</code></td><td><code>string</code> <br>current UTC date time</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"appVersion\": \"0.50.2\",\n \"dbVersion\": 194,\n \"syncVersion\": 25,\n \"buildDate\": \"2022-02-09T22:52:36+01:00\",\n \"buildRevision\": \"23daaa2387a0655685377f0a541d154aeec2aae8\",\n \"dataDirectory\": \"/home/user/data\",\n \"clipperProtocolVersion\": 1.1,\n \"utcDateTime\": \"2022-03-07T21:54:25.277Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Create a backup</h3><p><code>PUT /backup/{backupName}</code> · <code>createBackup</code></p><p>Create a database backup under a given name</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>backupName</code> <br><em>required</em></td><td><code>StringId</code> <br>If the backupName is e.g. \"now\", then the backup will be written to \"backup-now.db\" file</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: backup has been created</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h3>Get instance metrics</h3><p><code>GET /metrics</code> · <code>getMetrics</code></p><p>Returns instance and database metrics for monitoring: note, attachment, revision, branch, attribute and blob counts, note and attachment type breakdowns, version information and database size. Counts only — no note titles, content or attributes.</p><p>The same data is served by GET /api/metrics to the web session.</p><p><strong>Authorization</strong>: <code>EtapiTokenAuth</code> or <code>EtapiBasicAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>string</code> <br>Response format. Defaults to Prometheus text. One of <code>prometheus</code>, <code>json</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: instance metrics</p><div class=\"trilium-tab-panel\"><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>text/plain</code>: <code>string</code></p><div class=\"trilium-tab-panel\"><pre><code class=\"language-text-x-trilium-auto\"># HELP trilium_info Trilium instance information\n# TYPE trilium_info gauge\ntrilium_info{version=\"0.99.3\",db_version=\"231\"} 1 1701432000\n\n# HELP trilium_notes_total Total number of notes including deleted\n# TYPE trilium_notes_total gauge\ntrilium_notes_total 1234 1701432000</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>application/json</code>: <code>Metrics</code></p><div class=\"trilium-tab-panel\"><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>version</code></td><td><code>object</code></td></tr><tr><td><code>database</code></td><td><code>object</code></td></tr><tr><td><code>noteTypes</code></td><td><code>object</code> <br>Number of active notes per note type</td></tr><tr><td><code>attachmentTypes</code></td><td><code>object</code> <br>Number of active attachments per MIME type</td></tr><tr><td><code>statistics</code></td><td><code>object</code></td></tr><tr><td><code>timestamp</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"version\": {\n \"app\": \"0.99.3\",\n \"db\": 231,\n \"node\": \"v22.14.0\",\n \"sync\": 35,\n \"buildDate\": \"2024-09-07T18:36:34Z\",\n \"buildRevision\": \"7c0d6930fa8f20d269dcfbcbc8f636a25f6bb9a7\"\n },\n \"database\": {\n \"totalNotes\": 0,\n \"deletedNotes\": 0,\n \"activeNotes\": 0,\n \"protectedNotes\": 0,\n \"totalAttachments\": 0,\n \"deletedAttachments\": 0,\n \"activeAttachments\": 0,\n \"totalRevisions\": 0,\n \"totalBranches\": 0,\n \"totalAttributes\": 0,\n \"totalBlobs\": 0,\n \"totalEtapiTokens\": 0,\n \"totalRecentNotes\": 0\n },\n \"noteTypes\": {\n \"text\": 800,\n \"code\": 200\n },\n \"attachmentTypes\": {\n \"image/png\": 45,\n \"application/pdf\": 14\n },\n \"statistics\": {\n \"oldestNote\": \"string\",\n \"newestNote\": \"string\",\n \"lastModified\": \"string\",\n \"databaseSizeBytes\": 0\n },\n \"timestamp\": \"2024-12-01T12:00:00.000Z\"\n}</code></pre></div></div></div></section></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">default: unexpected error</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json; charset=utf-8</code>: <code>Error</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"status\": 400,\n \"code\": \"NOTE_IS_PROTECTED\",\n \"message\": \"Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI\"\n}</code></pre></div></div></div></section></div><h2>Schemas</h2><h3><code>CreateNoteDef</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>EntityId</code> <br>Note ID of the parent note in the tree</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>book</code>, <code>relationMap</code>, <code>render</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code> <br>this needs to be specified only for note types 'code', 'file', 'image'.</td></tr><tr><td><code>content</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer</code> <br>Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000</td></tr><tr><td><code>prefix</code></td><td><code>string</code> <br>Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix.</td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code> <br>true if this note (as a folder) should appear expanded</td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>DON'T specify unless you want to force a specific noteId</td></tr><tr><td><code>branchId</code></td><td><code>EntityId</code> <br>DON'T specify unless you want to force a specific branchId</td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code> <br>Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset).</td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code> <br>UTC timestap of the note creation. Specify only if you want to override the default (current datetime).</td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime).</td></tr></tbody></table></figure><h3><code>Note</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the note. Returned as \"[protected]\" for protected notes, since ETAPI cannot open a protected session.</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>attributes</code></td><td><code>AttributeList</code></td></tr><tr><td><code>parentNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childNoteIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>parentBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>childBranchIds</code></td><td><code>EntityIdList</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code> <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it.</td></tr></tbody></table></figure><h3><code>Branch</code></h3><p>Branch places the note into the tree, it represents the relationship between a parent note and child note</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>parentNoteId</code></td><td><code>EntityId</code> <br>identifies the parent note</td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure><h3><code>NoteWithBranch</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td></tr><tr><td><code>branch</code></td><td><code>Branch</code> <br>Branch places the note into the tree, it represents the relationship between a parent note and child note</td></tr></tbody></table></figure><h3><code>Attachment</code></h3><p>Attachment is owned by a note, has title and content</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>EntityId</code></td></tr><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title of the attachment. Returned as \"[protected]\" for protected attachments, since ETAPI cannot open a protected session.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateModified</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateScheduledForErasureSince</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure><h3><code>CreateAttachment</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>ownerId</code></td><td><code>EntityId</code> <br>identifies the owner of the attachment, is either noteId or revisionId</td></tr><tr><td><code>role</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code> <br>Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with <code>PUT /attachments/{attachmentId}/content</code>.</td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure><h3><code>Attribute</code></h3><p>Attribute (Label, Relation) is a key-value record attached to a note.</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code> <br>identifies the child note</td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>value</code></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer (int32)</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr></tbody></table></figure><h3><code>AttributeList</code></h3><p>Type: <code>array of Attribute</code></p><h3><code>SearchResponse</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>results</code> <br><em>required</em></td><td><code>array of Note</code></td></tr><tr><td><code>debugInfo</code></td><td><code>object</code> <br>debugging info on parsing the search query enabled with &amp;debug=true parameter</td></tr></tbody></table></figure><h3><code>EntityId</code></h3><p>Type: <code>string</code></p><h3><code>StringId</code></h3><p>Type: <code>string</code></p><h3><code>EntityIdList</code></h3><p>Type: <code>array of EntityId</code></p><h3><code>LocalDateTime</code></h3><p>Type: <code>string</code></p><h3><code>UtcDateTime</code></h3><p>Type: <code>string</code></p><h3><code>AppInfo</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>appVersion</code></td><td><code>string</code> <br>Trilium version</td></tr><tr><td><code>dbVersion</code></td><td><code>integer (int32)</code> <br>DB version</td></tr><tr><td><code>syncVersion</code></td><td><code>integer (int32)</code> <br>Sync protocol version</td></tr><tr><td><code>buildDate</code></td><td><code>string (date-time)</code> <br>build date</td></tr><tr><td><code>buildRevision</code></td><td><code>string</code> <br>git build revision</td></tr><tr><td><code>dataDirectory</code></td><td><code>string</code> <br>data directory where Trilium stores files</td></tr><tr><td><code>clipperProtocolVersion</code></td><td><code>string</code> <br>version of the supported Trilium Web Clipper protocol</td></tr><tr><td><code>utcDateTime</code></td><td><code>string</code> <br>current UTC date time</td></tr></tbody></table></figure><h3><code>Error</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>status</code> <br><em>required</em></td><td><code>integer (int32)</code> <br>HTTP status, identical to the one given in HTTP response</td></tr><tr><td><code>code</code> <br><em>required</em></td><td><code>string</code> <br>stable string constant</td></tr><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code> <br>Human readable error, potentially with more details,</td></tr></tbody></table></figure><h3><code>Revision</code></h3><p>Revision represents a snapshot of note's title and content at some point in the past.</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>EntityId</code></td></tr><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>type</code></td><td><code>string</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>webView</code>, <code>shortcut</code>, <code>doc</code>, <code>contentWidget</code>, <code>launcher</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of the blob object which effectively serves as a content hash</td></tr><tr><td><code>dateLastEdited</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>dateCreated</code></td><td><code>LocalDateTime</code></td></tr><tr><td><code>utcDateLastEdited</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>UtcDateTime</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer (int32)</code></td></tr></tbody></table></figure><h3><code>RecentChange</code></h3><p>Represents a recent change event (creation, modification, or deletion).</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>EntityId</code></td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Title at the time of the change (may be \"[protected]\" for protected notes)</td></tr><tr><td><code>current_title</code></td><td><code>string</code> <br>Current title of the note (may be \"[protected]\" for protected notes)</td></tr><tr><td><code>current_isDeleted</code></td><td><code>boolean</code> <br>Whether the note is currently deleted</td></tr><tr><td><code>current_deleteId</code></td><td><code>string</code> <br>Delete ID if the note is deleted</td></tr><tr><td><code>current_isProtected</code></td><td><code>boolean</code> <br>Whether the note is protected</td></tr><tr><td><code>utcDate</code></td><td><code>UtcDateTime</code> <br>UTC timestamp of the change</td></tr><tr><td><code>date</code></td><td><code>LocalDateTime</code> <br>Local timestamp of the change</td></tr><tr><td><code>canBeUndeleted</code></td><td><code>boolean</code> <br>Whether the note can be undeleted (only present for deleted notes)</td></tr></tbody></table></figure><h3><code>Metrics</code></h3><p>Instance and database metrics, as served by GET /etapi/metrics?format=json</p><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>version</code></td><td><code>object</code></td></tr><tr><td><code>database</code></td><td><code>object</code></td></tr><tr><td><code>noteTypes</code></td><td><code>object</code> <br>Number of active notes per note type</td></tr><tr><td><code>attachmentTypes</code></td><td><code>object</code> <br>Number of active attachments per MIME type</td></tr><tr><td><code>statistics</code></td><td><code>object</code></td></tr><tr><td><code>timestamp</code></td><td><code>string</code></td></tr></tbody></table></figure>",
"_help_47ZrP6FNuoG8": "<p>When a new note is created, its name is by default \"new note\". In some cases, it can be desirable to have a different or even a dynamic default note title.</p><p>For this use case, Trilium (since v0.52) supports <code>#titleTemplate</code> <a href=\"#root/_help_zEY4DaJG4YT5\">label</a>. You can create such a label for a given note, assign it a value, and this value will be used as a default title when creating child notes. As with other labels, you can make it inheritable to apply recursively, and you can even place it on the root note to have it applied globally everywhere.</p><p>As an example use case, imagine you collect books you've read in a given year like this:</p><ul><li>2022 Books<ul><li>Neal Stephenson: Anathem, 2008</li><li>Franz Kafka: Die Verwandlung, 1915</li></ul></li></ul><p>Now, to the parent note \"2022 Books\" you can assign label <code>#titleTemplate=\"[Author name]: [Book title], [Publication year]\"</code>.</p><p>And all children of \"2022 Books\" will be created with initial title \"[Author name]: [Book title], [Publication year]\". There's no artificial intelligence here, the idea is to just prompt you to manually fill in the pieces of information into the note title by yourself.</p><h2>Titles set by a template</h2><p>A template can name the notes created from it, wherever they are created. To do so, add a <code>#template:titleTemplate</code> label to the template note, for example <code>#template:titleTemplate=\"Meeting ${now.format('YYYY-MM-DD')}\"</code> on a <em>Meeting</em> template.</p><ul><li>It applies both when the template is picked explicitly and when it comes from a parent's <code>~child:template</code>. See <a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>.</li><li>It takes precedence over the parent's <code>#titleTemplate</code>. A title typed in by the user always wins.</li><li>It can be inherited from the template's ancestors in the tree (for example, a folder holding several templates), in which case a label owned by the template itself takes precedence. A note created from a template and later marked as a template does not keep that template's title.</li><li>Its value is evaluated the same way as <code>#titleTemplate</code>, with <code>parentNote</code> being the parent of the new note.</li></ul><h2>Dynamic value</h2><p>The value of <code>#titleTemplate</code> is evaluated at the point of note's creation as a JavaScript string, which means it can be enriched with the help of JS string interpolation with dynamic data.</p><p>Second variable injected is <code>parentNote</code> which gives access to the parent <a href=\"{{helpAssets}}/User%20Guide/Scripting/Script%20API/Frontend%20API/FNote.dat\"><code>FNote</code></a>.</p><p>See also&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>&nbsp;which provides similar capabilities, including default note's content.</p><h3>Examples</h3><ul><li>Imagine you collect server outage incidents and write some notes. It looks like this:<ul><li>Incidents<ul><li>2022-05-09: System crash</li><li>2022-05-15: Backup delay</li></ul></li><li>You can automatize the date assignment by assigning a label <code>#titleTemplate=\"${now.format('YYYY-MM-DD')}: \"</code> to the parent note \"Incidents\". Whenever a new child note is created, the title template is evaluated with the injected <a href=\"https://day.js.org/docs/en/display/format\">now</a> object.</li></ul></li><li>To use a parent's attribute in the title of new notes: <code>#titleTemplate=\"${parentNote.getLabelValue('authorName')}'s literary works\"</code></li><li>To mirror the parent's note title: <code>${parentNote.title}</code></li></ul>",
"_help_wX4HbRucYSDD": "<p>Your Trilium data is stored in a <a href=\"https://www.sqlite.org\">SQLite</a> database which contains all notes, tree structure, metadata, and most of the configuration. The database file is named <code>document.db</code> and is stored in the application's default&nbsp;<a href=\"#root/_help_tAassRL4RSQL\">Data directory</a>.</p><h2>Demo Notes</h2><p>When first starting Trilium, it will provide a set of notes to showcase various features of the application.</p><p>For more information see&nbsp;<a class=\"reference-link\" href=\"#root/_help_6tZeKvSHEUiB\">Demo Notes</a>.</p><h2>Manually Modifying the Database</h2><p>Trilium provides a lot of flexibility, and with it, opportunities for advanced users to tweak it. If you need to explore or modify the database directly, you can use a tool such as <a href=\"https://sqlitebrowser.org/\">SQLite Browser</a> to work directly on the database file.</p><p>See&nbsp;<a href=\"#root/_help_oyIAJ9PvvwHX\">Manually altering the database</a>&nbsp;for more information.</p><h2>How to Reset the Database</h2><p>If you want to start again and:</p><ul><li>Create and switch to a new blank knowledge base</li><li>Use a different knowledge base synced from a server or desktop application</li><li>Restore a backup</li></ul><p>You can navigate to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Database</em> and click the <em>Start over</em> button. You'll be prompted to restart the application, with the option to back up your current database before proceeding.</p><aside class=\"admonition important\"><p>For the web client, Trilium cannot restart automatically. You'll need to manually restart the server/container and then reload the web application.</p></aside><p>After restarting, the setup screen will appear. You can choose to back up your existing database, then proceed with the setup menu as if it's a new installation. The existing database will only be overwritten after selecting to create a new database, sync with a server, or restore from a backup.</p><h3>The Legacy Method</h3><p>If you are experimenting with Trilium and want to return it to its original state, you can do that by deleting the current database. When you restart the application, it will generate a new database containing the original demo notes.</p><p>To delete the database, simply go to the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a> and delete the <code>document.db</code> file (and any other files starting with <code>document.db</code>).</p><p>If you do not need to preserve any configurations that might be stored in the <code>config.ini</code> file, you can just delete all of the <a href=\"#root/_help_tAassRL4RSQL\">data directory's</a> contents to fully restore the application to its original state. You can also review the <a href=\"#root/_help_Gzjqa934BdH4\">configuration</a> file to provide all <code>config.ini</code> values as environment variables instead.</p>",
"_help_oyIAJ9PvvwHX": "<p>There are some situations where modifying the SQLite database that Trilium uses is desirable.</p><p>If you are doing any advanced development or troubleshooting where you manually modify the database, you might want to consider creating backups of your <code>document.db</code> file.</p><h2>Modifying it internally using the SQL Console</h2><p>The SQL Console is Trilium's built-in database editor.</p><p>See&nbsp;<a class=\"reference-link\" href=\"#root/_help_YKWqdJhzi2VY\">SQL Console</a>.</p><h2>Externally modifying the database</h2><p>Sometimes the SQL Console cannot be used (for example if the application cannot start).</p><p>When making external modifications, consider closing the desktop application. If modifying the server database, then stop the service or Docker container.</p><h3>Using DB Browser for SQLite</h3><p>DB Browser for SQLite is a cross-platform editor that can be used to alter the database using a graphical user interface.</p><p>To do so:</p><ol><li>In the main menu, select File → Open database… and navigate to the database in the&nbsp;<a href=\"#root/_help_tAassRL4RSQL\">Data directory</a>.</li><li>Select the <em>Execute SQL</em> tab.</li><li>Type in the desired SQL statement.</li><li>Press the \"Play\" button in the toolbar underneath the \"Execute SQL\" tab (or F5 key).</li><li>Press \"Write Changes\" in the main toolbar.</li><li>Close the application or close the database.</li></ol><p><img src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Database/Manually%20altering%20the%20database_image.jpg\"></p><h3>Using the SQLite CLI</h3><p>First, start the SQLite 3 CLI by specifying the path to the database:</p><pre><code class=\"language-text-x-trilium-auto\">sqlite3 ~/.local/share/trilium-data/document.db</code></pre><ul><li>In the prompt simply type the statement and make sure it ends with a <code>;</code> character.</li><li>To exit, simply type <code>.quit</code> and enter.</li></ul>",
@@ -234,6 +234,7 @@
"_help_1YeN2MzFUluU": "<p>One core aspect of Trilium that allows it to have support for multiple&nbsp;<a href=\"#root/_help_KSZ04uQ2D1St\">Note Types</a>&nbsp;is the fact that it makes use of various off-the-shelf or reusable libraries.</p><p>This page showcases some of the technologies used, for a better understanding of how Trilium works but also to credit the developers of that particular technology.</p><h2>CKEditor</h2><p>CKEditor is the editor behind&nbsp;<a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes, as well as integrated in various facets of the application such as the attribute editor in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_AlJ73vBCjWDw\">Status bar</a>&nbsp;or the chat box in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_GBBMSlVSOIGP\">AI</a>&nbsp;sidebar or notes.</p><p>For more information see&nbsp;<a class=\"reference-link\" href=\"#root/_help_MI26XDLSAlCD\">CKEditor</a>.</p><h2>Excalidraw</h2><p><a href=\"https://excalidraw.com/\">Excalidraw</a> is the technology behind the&nbsp;<a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a>&nbsp;notes. The source code of the library is available on <a href=\"https://github.com/excalidraw/excalidraw\">GitHub</a>.</p><p>We are using an unmodified version of it, so it shares the same <a href=\"https://github.com/excalidraw/excalidraw/issues\">issues</a> as the original.</p><h2>MapLibre GL JS</h2><p>Trilium v0.105.0 introduces <a href=\"https://github.com/maplibre/maplibre-gl-js\">MapLibre GL JS</a> for the&nbsp;<a class=\"reference-link\" href=\"#root/_help_81SGnPGMk7Xc\">Geo Map</a>&nbsp;collection, which brings improved performance by using graphical acceleration (WebGL). Trilium ships its own track parsing logic as well as most of the UI such as the right panel.</p><h2>MindElixir</h2><p>MindElixir is the library we are using for&nbsp;<a class=\"reference-link\" href=\"#root/_help_gBbsAeiuUxI5\">Mind Map</a>&nbsp;note types. The main library is available on <a href=\"https://github.com/SSShooter/mind-elixir-core/issues\">GitHub as mind-elixir-core</a>.</p><p>Trilium ships its own UI which covers the toolbars, the contextual menu, the zoom buttons and the right panel that shows when clicking a node.</p><h2>FullCalendar</h2><p><a href=\"https://fullcalendar.io/\">FullCalendar</a> is the technology behind the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xWbu3jpNWapp\">Calendar</a>&nbsp;collection, providing the various views (day, week, month, year) and the event management. Trilium also ships its own UI in the form of the popup that appears when editing, as well as the header that appears in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_CssoWBu8I7jF\">Collection Properties</a>.</p><p>Licensed under the MIT license.</p>",
"_help_MI26XDLSAlCD": "<h2>Editor core</h2><p>The CKEditor is the WYSIWYG (standing for What You See Is What You Get) editor behind&nbsp;<a href=\"#root/_help_iPIMuisry3hd\">Text</a>&nbsp;notes.</p><p>Their website is <a href=\"https://ckeditor.com/\">ckeditor.com</a>.</p><p>CKEditor by itself is a commercial product, but the core is open-source. As described in <a href=\"https://ckeditor.com/docs/ckeditor5/latest/features/index.html\">its documentation</a>, the editor supports quite a large number of features. Do note that not all the features are enabled in Trilium.</p><h2>Premium features</h2><p>CKEditor ships some plugins as premium (slash commands, templates, AI integration). Initially Trilium (since v0.96.0) shipped some of them like slash commands as part of a license grant from CKEditor to the Trilium Notes developers.</p><p>In v0.105.0 we've decided to replace those premium plugins with our own open-source implementations. This also means that we can better tailor those plugins to the Trilium app.</p><h2>Plugins</h2><p>The CKEditor ecosystem is quite extensible, in the sense that custom plugins can be written to extend the functionality of the editor beyond its original scope.</p><p>Trilium makes use of such features:</p><ul><li>The math feature is added by a version of <a href=\"https://github.com/isaul32/ckeditor5-math\">isaul32/ckeditor5-math: Math feature for CKEditor 5.</a> modified by us to fit our needs.</li><li><a href=\"https://github.com/mlewand/ckeditor5-keyboard-marker\">mlewand/ckeditor5-keyboard-marker: Plugin adds support for the keyboard input element (<code>&lt;kbd&gt;</code>) to CKEditor 5.</a></li><li>A modified version of <a href=\"https://github.com/ThomasAitken/ckeditor5-footnotes\">ThomasAitken/ckeditor5-footnotes: Footnotes plugin for CKEditor5</a> to allow footnotes.</li></ul><p>Apart from that, Trilium also has its own set of specific plugins such as:</p><ul><li><a class=\"reference-link\" href=\"#root/_help_2x0ZAX9ePtzV\">Cut to subnote</a></li><li><a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>, which also shows drawing canvases and <a href=\"#root/_help_CohkqWQC1iBv\">Mermaid diagrams</a> in place.</li><li>Mentions, for linking pages.</li><li><a class=\"reference-link\" href=\"#root/_help_Oau6X9rCuegd\">Markdown</a></li><li><a href=\"#root/_help_QEAPj01N5f7w\">Reference links</a></li><li><a href=\"#root/_help_NwBbFdNZ9h7O\">Admonitions</a>, we ended up creating our own plugin but <a href=\"https://github.com/aarkue/ckeditor5-admonition\">aarkue/ckeditor5-admonition</a> was a good inspiration (including the toolbar icon).</li></ul>",
"_help_m1lbrzyKDaRB": "<p>Whereas some applications use file names to uniquely identify notes, Trilium uses the concept of Note ID.</p><p>Generally, the Note ID is a 12-character long alphanumeric sequence (including both lower and upper case letter) that is randomly generated for each new note.</p><h2>How does the import/export affect the note IDs</h2><p>When notes are exported, their note ID is kept in the metadata of the export. However when they are imported back in, a new note ID is generated for all the notes. This also includes other entities that are part of the import/export process such as&nbsp;<a class=\"reference-link\" href=\"#root/_help_0vhv7lsOLy82\">Attachments</a>.</p><h2>Note collisions</h2><p>Since the Note ID is a fixed-width randomly generated number, due to the <a href=\"https://en.wikipedia.org/wiki/Pigeonhole_principle\">pigeonhole principle</a>, there is a possibility that a newly created note will have the same ID as an existing note.</p><p>Since the note ID is alphanumeric and the length is 12 we have&nbsp;<span class=\"math-tex\">\\(62^{12}\\)</span>&nbsp;unique IDs. However since we are generating them randomly, we can use a collision calculator such as the one for <a href=\"https://alex7kom.github.io/nano-nanoid-cc/?alphabet=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&amp;size=12&amp;speed=1000&amp;speedUnit=hour\">Nano ID</a> to determine that we'd need to create 1000 notes per hour every hour for 9 centuries in order to have at least 1% probability of a note collision.</p><p>As such, Trilium does not take any explicit action against potential note collisions, similar to other software that makes uses of unique hashes such as <a href=\"https://stackoverflow.com/questions/10434326/hash-collision-in-git\">Git</a>. If one would theoretically occur, what would most likely happen is that the existing note will be replaced by the new one.</p>",
+ "_help_z8O2VG4ZZJD7": "<p>This is the internal API used by the Trilium Notes client application.</p><p><strong>Important:</strong> This API is primarily intended for internal use by the Trilium client. For external integrations, please use the <a href=\"https://github.com/TriliumNext/Trilium/blob/main/docs/User%20Guide/User%20Guide/Advanced%20Usage/ETAPI%20(REST%20API).md#etapi-rest-api\">ETAPI (External Trilium API)</a> instead.</p><h2>Authentication</h2><p>Most endpoints require session-based authentication. You can authenticate using:</p><ul><li><strong>Password login</strong>: POST to <code>/api/login</code> with password</li><li><strong>Token authentication</strong>: Generate a token via <code>/api/login/token</code></li><li><strong>Sync authentication</strong>: Use document secret for sync operations</li></ul><h2>Rate Limiting</h2><p>Authentication endpoints are rate-limited to prevent brute force attacks.</p><h2>CSRF Protection</h2><p>State-changing operations require CSRF tokens when using session authentication.</p><h2>Authentication</h2><h3><code>sessionAuth</code></h3><p>API key in the <code>trilium.sid</code> cookie.</p><p>Session cookie obtained from login</p><h3><code>tokenAuth</code></h3><p>API key in the <code>Authorization</code> header.</p><p>API token in format \"Bearer {token}\"</p><h2>Authentication</h2><p>Login, logout, and session management</p><h3>Login with password</h3><p><code>POST /api/login</code> · <code>login</code></p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/x-www-form-urlencoded</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code> <br><em>required</em></td><td><code>string (password)</code></td></tr><tr><td><code>totpToken</code></td><td><code>string</code> <br>TOTP token if 2FA is enabled</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Login successful</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">401: Invalid credentials or TOTP token</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Generate API token</h3><p><code>POST /api/login/token</code> · <code>generateToken</code></p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code> <br><em>required</em></td><td><code>string (password)</code></td></tr><tr><td><code>tokenName</code></td><td><code>string</code> <br>Optional name for the token</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"password\": \"string\",\n \"tokenName\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Token created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>authToken</code></td><td><code>string</code> <br>API authentication token</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"authToken\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Sync login using document secret</h3><p><code>POST /api/login/sync</code> · <code>loginSync</code></p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>timestamp</code> <br><em>required</em></td><td><code>string (date-time)</code></td></tr><tr><td><code>hash</code> <br><em>required</em></td><td><code>string</code> <br>HMAC hash of document secret and timestamp</td></tr><tr><td><code>syncVersion</code> <br><em>required</em></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"timestamp\": \"2019-08-24T14:15:22Z\",\n \"hash\": \"string\",\n \"syncVersion\": 0\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Login successful</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>instanceId</code></td><td><code>string</code></td></tr><tr><td><code>maxEntityChangeId</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"instanceId\": \"string\",\n \"maxEntityChangeId\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Enter protected session</h3><p><code>POST /api/login/protected</code> · <code>enterProtectedSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code> <br><em>required</em></td><td><code>string (password)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"password\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Protected session entered</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">401: Invalid password</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Exit protected session</h3><p><code>POST /api/logout/protected</code> · <code>exitProtectedSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Protected session exited</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Keep protected session alive</h3><p><code>POST /api/login/protected/touch</code> · <code>touchProtectedSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Session refreshed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get OAuth status</h3><p><code>GET /api/oauth/status</code> · <code>getOAuthStatus</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: OAuth status</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>enabled</code></td><td><code>boolean</code></td></tr><tr><td><code>configured</code></td><td><code>boolean</code></td></tr><tr><td><code>providers</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"enabled\": true,\n \"configured\": true,\n \"providers\": [\n \"string\"\n ]\n}</code></pre></div></div></div></section></div><h3>Validate OAuth configuration</h3><p><code>GET /api/oauth/validate</code> · <code>validateOAuth</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: OAuth validation result</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>valid</code></td><td><code>boolean</code></td></tr><tr><td><code>errors</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"valid\": true,\n \"errors\": [\n \"string\"\n ]\n}</code></pre></div></div></div></section></div><h2>Notes</h2><p>Core note operations</p><h3>Get note metadata</h3><p><code>GET /api/notes/{noteId}</code> · <code>getNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note metadata</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Delete note</h3><p><code>DELETE /api/notes/{noteId}</code> · <code>deleteNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>taskId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>eraseNotes</code></td><td><code>boolean</code></td></tr><tr><td><code>last</code> <br><em>required</em></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Note deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get note content</h3><p><code>GET /api/notes/{noteId}/blob</code> · <code>getNoteContent</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note content</p><div class=\"trilium-tab-panel\"><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>text/html</code>: <code>string</code></p><div class=\"trilium-tab-panel\"><p>&nbsp;</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>text/plain</code>: <code>string</code></p><div class=\"trilium-tab-panel\"><p>&nbsp;</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>application/json</code>: <code>object</code></p><div class=\"trilium-tab-panel\"><pre><code class=\"language-application-json\">{}</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>application/octet-stream</code>: <code>string (binary)</code></p><div class=\"trilium-tab-panel\"><p>&nbsp;</p></div></section></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Update note content</h3><p><code>PUT /api/notes/{noteId}/data</code> · <code>updateNoteContent</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>content</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>attachments</code></td><td><code>array of Attachment</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"content\": \"string\",\n \"attachments\": [\n {\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Content updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get note timestamps</h3><p><code>GET /api/notes/{noteId}/metadata</code> · <code>getNoteMetadata</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note timestamps</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Timestamps</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Change note title</h3><p><code>PUT /api/notes/{noteId}/title</code> · <code>updateNoteTitle</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Title updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Change note type and MIME</h3><p><code>PUT /api/notes/{noteId}/type</code> · <code>updateNoteType</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"type\": \"text\",\n \"mime\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Type updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Protect or unprotect note</h3><p><code>PUT /api/notes/{noteId}/protect/{isProtected}</code> · <code>protectNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>subtree</code></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Protection status updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Undelete note</h3><p><code>PUT /api/notes/{noteId}/undelete</code> · <code>undeleteNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Note undeleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: Note not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Create new note</h3><p><code>POST /api/notes/{parentNoteId}/children</code> · <code>createNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>target</code></td><td><code>string</code> <br>One of <code>after</code>, <code>into</code>.</td></tr><tr><td><code>targetBranchId</code></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>CreateNoteRequest</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer</code></td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code></td><td><code>string</code></td></tr><tr><td><code>templateNoteId</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"content\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"isExpanded\": true,\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"parentNoteId\": \"string\",\n \"templateNoteId\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>note</code></td><td><code>Note</code></td></tr><tr><td><code>branch</code></td><td><code>Branch</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"note\": {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n },\n \"branch\": {\n \"branchId\": \"string\",\n \"noteId\": \"string\",\n \"parentNoteId\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true\n }\n}</code></pre></div></div></div></section></div><h3>Duplicate note subtree</h3><p><code>POST /api/notes/{noteId}/duplicate/{parentNoteId}</code> · <code>duplicateNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Note duplicated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Force save revision</h3><p><code>POST /api/notes/{noteId}/revision</code> · <code>saveRevision</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Revision saved</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Revision</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>string</code></td></tr><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>type</code></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"revisionId\": \"string\",\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Sort child notes</h3><p><code>PUT /api/notes/{noteId}/sort-children</code> · <code>sortChildren</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sortBy</code></td><td><code>string</code> <br>One of <code>title</code>, <code>dateCreated</code>, <code>dateModified</code>.</td></tr><tr><td><code>sortDirection</code></td><td><code>string</code> <br>One of <code>asc</code>, <code>desc</code>.</td></tr><tr><td><code>foldersFirst</code></td><td><code>boolean</code></td></tr><tr><td><code>sortNatural</code></td><td><code>boolean</code></td></tr><tr><td><code>sortLocale</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"sortBy\": \"title\",\n \"sortDirection\": \"asc\",\n \"foldersFirst\": true,\n \"sortNatural\": true,\n \"sortLocale\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Children sorted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Convert note to attachment</h3><p><code>POST /api/notes/{noteId}/convert-to-attachment</code> · <code>convertToAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note converted to attachment</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>ownerId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>role</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>image</code>, <code>file</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Upload file to note</h3><p><code>PUT /api/notes/{noteId}/file</code> · <code>uploadFileToNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: File uploaded</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Open file note</h3><p><code>GET /api/notes/{noteId}/open</code> · <code>openFileNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: File content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Download file note</h3><p><code>GET /api/notes/download/{noteId}</code> · <code>downloadFileNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: File content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Download file note (alternative path)</h3><p><code>GET /api/notes/{noteId}/download</code> · <code>downloadFileNoteAlt</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: File content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Save note to temp directory</h3><p><code>POST /api/notes/{noteId}/save-to-tmp-dir</code> · <code>saveToTmpDir</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: File saved to temp directory</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>filePath</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"filePath\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Update note from modified temp file</h3><p><code>POST /api/notes/{noteId}/upload-modified-file</code> · <code>uploadModifiedFile</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>filePath</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"filePath\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Note updated from file</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get image from note</h3><p><code>GET /api/images/{noteId}/{filename}</code> · <code>getNoteImage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>filename</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Image content</p><div class=\"trilium-tab-panel\"><ul><li><code>image/*</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Update image note</h3><p><code>PUT /api/images/{noteId}</code> · <code>updateImageNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Image updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Execute bulk action</h3><p><code>POST /api/bulk-action/execute</code> · <code>executeBulkAction</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>action</code></td><td><code>string</code></td></tr><tr><td><code>noteIds</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"action\": \"string\",\n \"noteIds\": [\n \"string\"\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Bulk action results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get affected notes count</h3><p><code>POST /api/bulk-action/affected-notes</code> · <code>getAffectedNotesCount</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>action</code></td><td><code>string</code></td></tr><tr><td><code>noteIds</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"action\": \"string\",\n \"noteIds\": [\n \"string\"\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Affected notes count</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>count</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"count\": 0\n}</code></pre></div></div></div></section></div><h3>Preview note deletion</h3><p><code>POST /api/delete-notes-preview</code> · <code>previewNoteDeletion</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchIdsToDelete</code></td><td><code>array of string</code></td></tr><tr><td><code>deleteAllClones</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchIdsToDelete\": [\n \"string\"\n ],\n \"deleteAllClones\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Deletion preview</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>notesToDelete</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"notesToDelete\": [\n \"string\"\n ]\n}</code></pre></div></div></div></section></div><h3>Erase deleted notes</h3><p><code>POST /api/notes/erase-deleted-notes-now</code> · <code>eraseDeletedNotes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Deleted notes erased</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Tree</h2><p>Note tree structure and branches</p><h3>Get tree structure</h3><p><code>GET /api/tree</code> · <code>getTree</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>subTreeNoteId</code></td><td><code>string</code> <br>Limit tree to this note and descendants</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Tree structure</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>notes</code></td><td><code>array of Note</code></td></tr><tr><td><code>branches</code></td><td><code>array of Branch</code></td></tr><tr><td><code>attributes</code></td><td><code>array of Attribute</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"notes\": [\n {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"branches\": [\n {\n \"branchId\": \"string\",\n \"noteId\": \"string\",\n \"parentNoteId\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true\n }\n ],\n \"attributes\": [\n {\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n }\n ]\n}</code></pre></div></div></div></section></div><h3>Load specific notes</h3><p><code>POST /api/tree/load</code> · <code>loadNotes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteIds</code> <br><em>required</em></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteIds\": [\n \"string\"\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Loaded notes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>notes</code></td><td><code>array of Note</code></td></tr><tr><td><code>branches</code></td><td><code>array of Branch</code></td></tr><tr><td><code>attributes</code></td><td><code>array of Attribute</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"notes\": [\n {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"branches\": [\n {\n \"branchId\": \"string\",\n \"noteId\": \"string\",\n \"parentNoteId\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true\n }\n ],\n \"attributes\": [\n {\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n }\n ]\n}</code></pre></div></div></div></section></div><h3>Delete branch</h3><p><code>DELETE /api/branches/{branchId}</code> · <code>deleteBranch</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>taskId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>eraseNotes</code></td><td><code>boolean</code></td></tr><tr><td><code>last</code> <br><em>required</em></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Branch deleted</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteDeleted</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteDeleted\": true\n}</code></pre></div></div></div></section></div><h3>Move branch to new parent</h3><p><code>PUT /api/branches/{branchId}/move-to/{parentBranchId}</code> · <code>moveBranchToParent</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>parentBranchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Branch moved</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Move branch before another</h3><p><code>PUT /api/branches/{branchId}/move-before/{beforeBranchId}</code> · <code>moveBranchBefore</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>beforeBranchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Branch moved</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Move branch after another</h3><p><code>PUT /api/branches/{branchId}/move-after/{afterBranchId}</code> · <code>moveBranchAfter</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>afterBranchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Branch moved</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Set branch expanded state</h3><p><code>PUT /api/branches/{branchId}/expanded/{expanded}</code> · <code>setBranchExpanded</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>expanded</code> <br><em>required</em></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Expanded state updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Set subtree expanded state</h3><p><code>PUT /api/branches/{branchId}/expanded-subtree/{expanded}</code> · <code>setSubtreeExpanded</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>expanded</code> <br><em>required</em></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Subtree expanded state updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Set branch prefix</h3><p><code>PUT /api/branches/{branchId}/set-prefix</code> · <code>setBranchPrefix</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>prefix</code></td><td><code>string | null</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"prefix\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Prefix updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Clone note to branch</h3><p><code>PUT /api/notes/{noteId}/clone-to-branch/{parentBranchId}</code> · <code>cloneToBranch</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>parentBranchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note cloned</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code> <br>Branch ID (parentNoteId_noteId)</td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>notePosition</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>prefix</code></td><td><code>string | null</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"string\",\n \"noteId\": \"string\",\n \"parentNoteId\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true\n}</code></pre></div></div></div></section></div><h3>Clone note to parent note</h3><p><code>PUT /api/notes/{noteId}/clone-to-note/{parentNoteId}</code> · <code>cloneToNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note cloned</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code> <br>Branch ID (parentNoteId_noteId)</td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>notePosition</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>prefix</code></td><td><code>string | null</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"string\",\n \"noteId\": \"string\",\n \"parentNoteId\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true\n}</code></pre></div></div></div></section></div><h3>Clone note after branch</h3><p><code>PUT /api/notes/{noteId}/clone-after/{afterBranchId}</code> · <code>cloneAfterBranch</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>afterBranchId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note cloned</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Branch</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code> <br>Branch ID (parentNoteId_noteId)</td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>notePosition</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>prefix</code></td><td><code>string | null</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"branchId\": \"string\",\n \"noteId\": \"string\",\n \"parentNoteId\": \"string\",\n \"notePosition\": 0,\n \"prefix\": \"string\",\n \"isExpanded\": true\n}</code></pre></div></div></div></section></div><h3>Toggle note presence in parent</h3><p><code>PUT /api/notes/{noteId}/toggle-in-parent/{parentNoteId}/{present}</code> · <code>toggleInParent</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>present</code> <br><em>required</em></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Presence toggled</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Attributes</h2><p>Note attributes and metadata</p><h3>Get effective note attributes</h3><p><code>GET /api/notes/{noteId}/attributes</code> · <code>getNoteAttributes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note attributes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of Attribute</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n }\n]</code></pre></div></section></div><h3>Update all note attributes</h3><p><code>PUT /api/notes/{noteId}/attributes</code> · <code>updateNoteAttributes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>array of Attribute</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n }\n]</code></pre><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attributes updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Add note attribute</h3><p><code>POST /api/notes/{noteId}/attributes</code> · <code>addNoteAttribute</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Attribute added</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div></div></section></div><h3>Delete attribute</h3><p><code>DELETE /api/notes/{noteId}/attributes/{attributeId}</code> · <code>deleteAttribute</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attribute deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Update single attribute</h3><p><code>PUT /api/notes/{noteId}/attribute</code> · <code>updateAttribute</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attribute updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Set attribute value</h3><p><code>PUT /api/notes/{noteId}/set-attribute</code> · <code>setAttribute</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attribute set</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Create relation</h3><p><code>PUT /api/notes/{noteId}/relations/{name}/to/{targetNoteId}</code> · <code>createRelation</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>targetNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Relation created</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Delete relation</h3><p><code>DELETE /api/notes/{noteId}/relations/{name}/to/{targetNoteId}</code> · <code>deleteRelation</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>targetNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Relation deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get attribute name suggestions</h3><p><code>GET /api/attribute-names</code> · <code>getAttributeNames</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>query</code></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attribute names</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of string</code></li></ul><pre><code class=\"language-application-json\">[\n \"string\"\n]</code></pre></div></section></div><h3>Get values for attribute</h3><p><code>GET /api/attribute-values/{attributeName}</code> · <code>getAttributeValues</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeName</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attribute values</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of string</code></li></ul><pre><code class=\"language-application-json\">[\n \"string\"\n]</code></pre></div></section></div><h2>Attachments</h2><p>File attachments</p><h3>Stream file with partial content support</h3><p><code>GET /api/attachments/{attachmentId}/open-partial</code> · <code>openPartialFileAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Header parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>Range</code></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">206: Partial content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Get note attachments</h3><p><code>GET /api/notes/{noteId}/attachments</code> · <code>getNoteAttachments</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note attachments</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of Attachment</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n]</code></pre></div></section></div><h3>Save attachment</h3><p><code>POST /api/notes/{noteId}/attachments</code> · <code>saveAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>matchBy</code></td><td><code>string</code> <br>One of <code>attachmentId</code>, <code>title</code>.</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>ownerId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>role</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>image</code>, <code>file</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Attachment saved</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>ownerId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>role</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>image</code>, <code>file</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Upload attachment file</h3><p><code>POST /api/notes/{noteId}/attachments/upload</code> · <code>uploadAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>link</code></td><td><code>boolean</code> <br><code>true</code> answers with a link to the attachment instead of an image URL, and stores a picture as uploaded, without compressing it or shortening its name.</td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Attachment uploaded</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>ownerId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>role</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>image</code>, <code>file</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get attachment metadata</h3><p><code>GET /api/attachments/{attachmentId}</code> · <code>getAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment metadata</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Attachment</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>ownerId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>role</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>image</code>, <code>file</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"string\",\n \"ownerId\": \"string\",\n \"role\": \"image\",\n \"mime\": \"string\",\n \"title\": \"string\",\n \"blobId\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Delete attachment</h3><p><code>DELETE /api/attachments/{attachmentId}</code> · <code>deleteAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attachment deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get attachment content</h3><p><code>GET /api/attachments/{attachmentId}/blob</code> · <code>getAttachmentBlob</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>preview</code></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Rename attachment</h3><p><code>PUT /api/attachments/{attachmentId}/rename</code> · <code>renameAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attachment renamed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Convert attachment to note</h3><p><code>POST /api/attachments/{attachmentId}/convert-to-note</code> · <code>convertAttachmentToNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment converted to note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Update attachment file</h3><p><code>PUT /api/attachments/{attachmentId}/file</code> · <code>updateAttachmentFile</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Attachment file updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Open attachment</h3><p><code>GET /api/attachments/{attachmentId}/open</code> · <code>openAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Download attachment</h3><p><code>GET /api/attachments/download/{attachmentId}</code> · <code>downloadAttachment</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Download attachment (alternative path)</h3><p><code>GET /api/attachments/{attachmentId}/download</code> · <code>downloadAttachmentAlt</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Get all attachment information</h3><p><code>GET /api/attachments/{attachmentId}/all</code> · <code>getAllAttachmentInfo</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Complete attachment information</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>position</code></td><td><code>integer</code></td></tr><tr><td><code>contentLength</code></td><td><code>integer</code></td></tr><tr><td><code>ownerId</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attachmentId\": \"string\",\n \"title\": \"string\",\n \"mime\": \"string\",\n \"isProtected\": true,\n \"position\": 0,\n \"contentLength\": 0,\n \"ownerId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Save attachment to temporary directory</h3><p><code>POST /api/attachments/{attachmentId}/save-to-tmp-dir</code> · <code>saveAttachmentToTmpDir</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Attachment saved to temporary directory</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>tmpPath</code></td><td><code>string</code> <br>Path to temporary file</td></tr><tr><td><code>success</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"tmpPath\": \"string\",\n \"success\": true\n}</code></pre></div></div></div></section></div><h3>Upload modified attachment file</h3><p><code>POST /api/attachments/{attachmentId}/upload-modified-file</code> · <code>uploadModifiedAttachmentFile</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Modified file uploaded</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true\n}</code></pre></div></div></div></section></div><h3>Get attached image</h3><p><code>GET /api/attachments/{attachmentId}/image/{filename}</code> · <code>getAttachmentImage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>filename</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Image content</p><div class=\"trilium-tab-panel\"><ul><li><code>image/*</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Erase unused attachments</h3><p><code>POST /api/notes/erase-unused-attachments-now</code> · <code>eraseUnusedAttachments</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Unused attachments erased</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Revisions</h2><p>Note revision history</p><h3>Get note revisions</h3><p><code>GET /api/notes/{noteId}/revisions</code> · <code>getNoteRevisions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note revisions</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of Revision</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"revisionId\": \"string\",\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\"\n }\n]</code></pre></div></section></div><h3>Erase all note revisions</h3><p><code>DELETE /api/notes/{noteId}/revisions</code> · <code>eraseNoteRevisions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Revisions erased</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get revision details</h3><p><code>GET /api/revisions/{revisionId}</code> · <code>getRevision</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Revision details</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Revision</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>string</code></td></tr><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>type</code></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"revisionId\": \"string\",\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Erase revision</h3><p><code>DELETE /api/revisions/{revisionId}</code> · <code>eraseRevision</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Revision erased</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get revision content</h3><p><code>GET /api/revisions/{revisionId}/blob</code> · <code>getRevisionBlob</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>preview</code></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Revision content</p><div class=\"trilium-tab-panel\"><ul><li><code>text/html</code>: <code>string</code></li><li><code>text/plain</code>: <code>string</code></li><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Restore revision</h3><p><code>POST /api/revisions/{revisionId}/restore</code> · <code>restoreRevision</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Revision restored</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Download revision</h3><p><code>GET /api/revisions/{revisionId}/download</code> · <code>downloadRevision</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Revision content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Cleanup old revisions</h3><p><code>POST /api/revisions/erase-all-excess-revisions</code> · <code>eraseExcessRevisions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong></p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>snapshotsToKeep</code></td><td><code>integer</code> <br>Snapshots to keep per note, standing in for the revisionSnapshotNumberLimit option. -1 keeps every snapshot, 0 keeps none. Omitted, the option applies. A note carrying a valid #versioningLimit follows its own label instead.</td></tr><tr><td><code>keepNamedSnapshots</code></td><td><code>boolean</code> <br>Spare named snapshots (those with a description) from erasure and leave them out of the count, so the limit governs the automatic snapshots alone.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"snapshotsToKeep\": 0,\n \"keepNamedSnapshots\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Excess revisions erased</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>erasedCount</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"erasedCount\": 0\n}</code></pre></div></div></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">400: Invalid options</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get notes edited on date</h3><p><code>GET /api/edited-notes/{date}</code> · <code>getEditedNotes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Edited notes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of Note</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n]</code></pre></div></section></div><h3>Get image from revision</h3><p><code>GET /api/revisions/{revisionId}/image/{filename}</code> · <code>getRevisionImage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>filename</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Image content</p><div class=\"trilium-tab-panel\"><ul><li><code>image/*</code>: <code>string (binary)</code></li></ul></div></section></div><h2>Search</h2><p>Search and discovery</p><h3>Full text search</h3><p><code>GET /api/search</code> · <code>search</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>searchString</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Search results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of SearchResult</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"path\": \"string\",\n \"score\": 0,\n \"highlights\": [\n \"string\"\n ]\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">400: Missing or empty search string</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Quick search with highlighting</h3><p><code>GET /api/quick-search</code> · <code>quickSearch</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>searchString</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Quick search results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of SearchResult</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"path\": \"string\",\n \"score\": 0,\n \"highlights\": [\n \"string\"\n ]\n }\n]</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">400: Missing or empty search string</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Execute search note</h3><p><code>GET /api/search-note/{noteId}</code> · <code>executeSearchNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Search results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of SearchResult</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"path\": \"string\",\n \"score\": 0,\n \"highlights\": [\n \"string\"\n ]\n }\n]</code></pre></div></section></div><h3>Search and execute actions</h3><p><code>POST /api/search-and-execute-note/{noteId}</code> · <code>searchAndExecute</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Execution results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Find related notes by attributes</h3><p><code>POST /api/search-related</code> · <code>searchRelated</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>Attribute</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"attributeId\": \"string\",\n \"noteId\": \"string\",\n \"type\": \"label\",\n \"name\": \"string\",\n \"value\": \"string\",\n \"position\": 0,\n \"isInheritable\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Related notes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>count</code> <br><em>required</em></td><td><code>integer</code> <br>Distinct notes matching, counted before the twenty-result cap.</td></tr><tr><td><code>results</code> <br><em>required</em></td><td><code>array of object</code> <br>At most twenty, name-and-value matches ahead of name-only ones.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"count\": 0,\n \"results\": [\n {\n \"notePathArray\": [\n \"string\"\n ],\n \"score\": 0\n }\n ]\n}</code></pre></div></div></div></section></div><h3>Search template notes</h3><p><code>GET /api/search-templates</code> · <code>searchTemplates</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Template notes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of Note</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n]</code></pre></div></section></div><h3>Get autocomplete suggestions</h3><p><code>GET /api/autocomplete</code> · <code>autocomplete</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>query</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>fastSearch</code></td><td><code>boolean</code></td></tr><tr><td><code>activeNoteId</code></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Autocomplete suggestions</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"path\": \"string\"\n }\n]</code></pre></div></section></div><h3>Find similar notes</h3><p><code>GET /api/similar-notes/{noteId}</code> · <code>findSimilarNotes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Similar notes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"similarity\": 0\n }\n]</code></pre></div></section></div><h2>Import/Export</h2><p>Import and export operations</p><h3>Export branch</h3><p><code>GET /api/branches/{branchId}/export/{type}/{format}/{taskId}</code> · <code>exportBranch</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>subtree</code>, <code>single</code>.</td></tr><tr><td><code>format</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>html</code>, <code>markdown</code>, <code>opml</code>.</td></tr><tr><td><code>taskId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Exported content</p><div class=\"trilium-tab-panel\"><ul><li><code>application/octet-stream</code>: <code>string (binary)</code></li></ul></div></section></div><h3>Import notes</h3><p><code>POST /api/notes/{parentNoteId}/notes-import</code> · <code>importNotes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr><tr><td><code>safeImport</code></td><td><code>boolean</code></td></tr><tr><td><code>shrinkImages</code></td><td><code>boolean</code></td></tr><tr><td><code>textImportedAsText</code></td><td><code>boolean</code></td></tr><tr><td><code>codeImportedAsCode</code></td><td><code>boolean</code></td></tr><tr><td><code>explodeArchives</code></td><td><code>boolean</code></td></tr><tr><td><code>replaceUnderscoresWithSpaces</code></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Import results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>note</code></td><td><code>Note</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"string\",\n \"note\": {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n}</code></pre></div></div></div></section></div><h3>Import attachments</h3><p><code>POST /api/notes/{parentNoteId}/attachments-import</code> · <code>importAttachments</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>array of string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Import results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Sync</h2><p>Synchronization between instances</p><h3>Test sync connection</h3><p><code>POST /api/sync/test</code> · <code>testSync</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync test results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Trigger sync now</h3><p><code>POST /api/sync/now</code> · <code>syncNow</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync started</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get sync status</h3><p><code>GET /api/sync/check</code> · <code>checkSync</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync status</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>synced</code></td><td><code>boolean</code></td></tr><tr><td><code>lastSyncedPush</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>lastSyncedPull</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"synced\": true,\n \"lastSyncedPush\": \"2019-08-24T14:15:22Z\",\n \"lastSyncedPull\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get sync changes</h3><p><code>GET /api/sync/changed</code> · <code>getSyncChanges</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>instanceId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>lastEntityChangeId</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>logMarkerId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync changes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>entityChanges</code></td><td><code>array of EntityChange</code></td></tr><tr><td><code>lastEntityChangeId</code></td><td><code>integer</code></td></tr><tr><td><code>outstandingPullCount</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"entityChanges\": [\n {\n \"entityChange\": {\n \"entityName\": \"string\",\n \"changeId\": \"string\"\n },\n \"entity\": {}\n }\n ],\n \"lastEntityChangeId\": 0,\n \"outstandingPullCount\": 0\n}</code></pre></div></div></div></section></div><h3>Push sync changes</h3><p><code>PUT /api/sync/update</code> · <code>pushSyncChanges</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>logMarkerId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Header parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>pageCount</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>pageIndex</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>requestId</code></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>instanceId</code></td><td><code>string</code></td></tr><tr><td><code>entities</code></td><td><code>array of EntityChange</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"instanceId\": \"string\",\n \"entities\": [\n {\n \"entityChange\": {\n \"entityName\": \"string\",\n \"changeId\": \"string\"\n },\n \"entity\": {}\n }\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Changes processed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Mark sync as finished</h3><p><code>POST /api/sync/finished</code> · <code>finishSync</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Sync finished</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get sync statistics</h3><p><code>GET /api/sync/stats</code> · <code>getSyncStats</code></p><p><strong>Authorization</strong>: none</p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync statistics</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>initialized</code></td><td><code>boolean</code></td></tr><tr><td><code>stats</code></td><td><code>object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"initialized\": true,\n \"stats\": {}\n}</code></pre></div></div></div></section></div><h3>Fill entity changes</h3><p><code>POST /api/sync/fill-entity-changes</code> · <code>fillEntityChanges</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Entity changes filled</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Force full sync</h3><p><code>POST /api/sync/force-full-sync</code> · <code>forceFullSync</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Full sync forced</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Check entity changes consistency</h3><p><code>POST /api/sync/check-entity-changes</code> · <code>checkEntityChanges</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Consistency check results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Queue sector for sync</h3><p><code>POST /api/sync/queue-sector/{entityName}/{sector}</code> · <code>queueSyncSector</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>entityName</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>sector</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Sector queued</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h2>Scripting</h2><p>Script execution and automation</p><h3>Execute script</h3><p><code>POST /api/script/exec</code> · <code>executeScript</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>script</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>params</code></td><td><code>array of string</code></td></tr><tr><td><code>startNoteId</code></td><td><code>string</code></td></tr><tr><td><code>currentNoteId</code></td><td><code>string</code></td></tr><tr><td><code>originEntityName</code></td><td><code>string</code></td></tr><tr><td><code>originEntityId</code></td><td><code>string</code></td></tr><tr><td><code>transactional</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"script\": \"string\",\n \"params\": [\n \"string\"\n ],\n \"startNoteId\": \"string\",\n \"currentNoteId\": \"string\",\n \"originEntityName\": \"string\",\n \"originEntityId\": \"string\",\n \"transactional\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Script execution results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre></div></section></div><h3>Run script note</h3><p><code>POST /api/script/run/{noteId}</code> · <code>runScriptNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Script execution results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get startup script bundles</h3><p><code>GET /api/script/startup</code> · <code>getStartupScripts</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>mobile</code></td><td><code>boolean</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Startup scripts</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of ScriptBundle</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"script\": \"string\",\n \"html\": \"string\",\n \"css\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get widget script bundles</h3><p><code>GET /api/script/widgets</code> · <code>getWidgetScripts</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Widget scripts</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of ScriptBundle</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"script\": \"string\",\n \"html\": \"string\",\n \"css\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get script bundle for note</h3><p><code>POST /api/script/bundle/{noteId}</code> · <code>getScriptBundle</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Script bundle</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>ScriptBundle</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>script</code></td><td><code>string</code></td></tr><tr><td><code>html</code></td><td><code>string</code></td></tr><tr><td><code>css</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"string\",\n \"script\": \"string\",\n \"html\": \"string\",\n \"css\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Get relation script bundles</h3><p><code>GET /api/script/relation/{noteId}/{relationName}</code> · <code>getRelationScripts</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>relationName</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Relation scripts</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of ScriptBundle</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"script\": \"string\",\n \"html\": \"string\",\n \"css\": \"string\"\n }\n]</code></pre></div></section></div><h2>Configuration</h2><p>System options and settings</p><h3>Get application information</h3><p><code>GET /api/app-info</code> · <code>getAppInfo</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Application information</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>AppInfo</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>appVersion</code></td><td><code>string</code></td></tr><tr><td><code>dbVersion</code></td><td><code>integer</code></td></tr><tr><td><code>nodeVersion</code></td><td><code>string</code></td></tr><tr><td><code>syncVersion</code></td><td><code>integer</code></td></tr><tr><td><code>buildDate</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>buildRevision</code></td><td><code>string</code></td></tr><tr><td><code>dataDirectory</code></td><td><code>string</code></td></tr><tr><td><code>clipperProtocolVersion</code></td><td><code>string</code></td></tr><tr><td><code>utcDateTime</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"appVersion\": \"0.91.6\",\n \"dbVersion\": 228,\n \"nodeVersion\": \"string\",\n \"syncVersion\": 34,\n \"buildDate\": \"2019-08-24T14:15:22Z\",\n \"buildRevision\": \"string\",\n \"dataDirectory\": \"string\",\n \"clipperProtocolVersion\": \"string\",\n \"utcDateTime\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get setup status</h3><p><code>GET /api/setup/status</code> · <code>getSetupStatus</code></p><p><strong>Authorization</strong>: none</p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Setup status</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>isInitialized</code></td><td><code>boolean</code></td></tr><tr><td><code>schemaExists</code></td><td><code>boolean</code></td></tr><tr><td><code>syncVersion</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"isInitialized\": true,\n \"schemaExists\": true,\n \"syncVersion\": 0\n}</code></pre></div></div></div></section></div><h3>Initialize new document</h3><p><code>POST /api/setup/new-document</code> · <code>initNewDocument</code></p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>password</code> <br><em>required</em></td><td><code>string (password)</code></td></tr><tr><td><code>theme</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"password\": \"string\",\n \"theme\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Document initialized</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Setup sync from server</h3><p><code>POST /api/setup/sync-from-server</code> · <code>setupSyncFromServer</code></p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>syncServerHost</code> <br><em>required</em></td><td><code>string (uri)</code></td></tr><tr><td><code>syncProxy</code></td><td><code>string</code></td></tr><tr><td><code>password</code> <br><em>required</em></td><td><code>string (password)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"syncServerHost\": \"string\",\n \"syncProxy\": \"string\",\n \"password\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync setup successful</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get sync seed for setup</h3><p><code>GET /api/setup/sync-seed</code> · <code>getSyncSeed</code></p><p><strong>Authorization</strong>: none</p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Sync seed information</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>syncVersion</code></td><td><code>integer</code></td></tr><tr><td><code>schemaVersion</code></td><td><code>integer</code></td></tr><tr><td><code>documentSecret</code></td><td><code>string</code></td></tr><tr><td><code>maxSyncId</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"syncVersion\": 0,\n \"schemaVersion\": 0,\n \"documentSecret\": \"string\",\n \"maxSyncId\": 0\n}</code></pre></div></div></div></section></div><h3>Get system options</h3><p><code>GET /api/options</code> · <code>getOptions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: System options</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre></div></section></div><h3>Update multiple options</h3><p><code>PUT /api/options</code> · <code>updateOptions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Options updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Update single option</h3><p><code>PUT /api/options/{name}/{value}</code> · <code>updateOption</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Option updated</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get user-defined themes</h3><p><code>GET /api/options/user-themes</code> · <code>getUserThemes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: User themes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"name\": \"string\",\n \"label\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get supported locales</h3><p><code>GET /api/options/locales</code> · <code>getLocales</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Supported locales</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"code\": \"string\",\n \"name\": \"string\"\n }\n]</code></pre></div></section></div><h2>Database</h2><p>Database operations</p><h3>Get database schema</h3><p><code>GET /api/sql/schema</code> · <code>getDatabaseSchema</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Database schema</p><div class=\"trilium-tab-panel\"><ul><li><code>text/plain</code>: <code>string</code></li></ul></div></section></div><h3>Execute SQL from note</h3><p><code>POST /api/sql/execute/{noteId}</code> · <code>executeSql</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: SQL execution results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {}\n]</code></pre></div></section></div><h3>Create database backup</h3><p><code>POST /api/database/backup-database</code> · <code>backupDatabase</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Backup created</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>List existing backups</h3><p><code>GET /api/database/backups</code> · <code>listBackups</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Backup list</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>backupFolderPath</code></td><td><code>string | null</code> <br>Directory where the backups are stored, or null if there is no user-accessible location.</td></tr><tr><td><code>backups</code></td><td><code>array of object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"backupFolderPath\": \"string\",\n \"backups\": [\n {\n \"fileName\": \"string\",\n \"filePath\": \"string\",\n \"mtime\": \"2019-08-24T14:15:22Z\",\n \"fileSize\": 0\n }\n ]\n}</code></pre></div></div></div></section></div><h3>Vacuum database</h3><p><code>POST /api/database/vacuum-database</code> · <code>vacuumDatabase</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Database vacuumed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Anonymize database</h3><p><code>POST /api/database/anonymize/{type}</code> · <code>anonymizeDatabase</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>save-as-file</code>, <code>save-and-send</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Anonymization results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>List anonymized databases</h3><p><code>GET /api/database/anonymized-databases</code> · <code>listAnonymizedDatabases</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Anonymized database list</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>anonymizedFolderPath</code></td><td><code>string</code> <br>Directory where the anonymized databases are stored.</td></tr><tr><td><code>databases</code></td><td><code>array of object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"anonymizedFolderPath\": \"string\",\n \"databases\": [\n {\n \"fileName\": \"string\",\n \"filePath\": \"string\",\n \"mtime\": \"2019-08-24T14:15:22Z\",\n \"fileSize\": 0\n }\n ]\n}</code></pre></div></div></div></section></div><h3>Download an anonymized database file</h3><p><code>GET /api/database/anonymized/download</code> · <code>downloadAnonymizedDatabase</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>filePath</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Anonymized database file</p><div class=\"trilium-tab-panel\"><ul><li><code>application/x-sqlite3</code>: <code>string (binary)</code></li></ul></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">400: Missing filePath</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">403: Path outside the anonymized database directory</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">404: File not found</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Fix consistency issues</h3><p><code>POST /api/database/find-and-fix-consistency-issues</code> · <code>fixConsistencyIssues</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Consistency check results</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Check database integrity</h3><p><code>GET /api/database/check-integrity</code> · <code>checkIntegrity</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Integrity check results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>results</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"results\": [\n \"string\"\n ]\n}</code></pre></div></div></div></section></div><h2>LLM</h2><p>AI/LLM integration</p><h3>List all chat sessions</h3><p><code>GET /api/llm/chat</code> · <code>listChatSessions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Chat sessions</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of ChatSession</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"sessionId\": \"string\",\n \"title\": \"string\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"string\",\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"lastActive\": \"2019-08-24T14:15:22Z\",\n \"messageCount\": 0\n }\n]</code></pre></div></section></div><h3>Create new chat session</h3><p><code>POST /api/llm/chat</code> · <code>createChatSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>systemPrompt</code></td><td><code>string</code></td></tr><tr><td><code>temperature</code></td><td><code>number</code></td></tr><tr><td><code>maxTokens</code></td><td><code>integer</code></td></tr><tr><td><code>model</code></td><td><code>string</code></td></tr><tr><td><code>provider</code></td><td><code>string</code> <br>One of <code>openai</code>, <code>anthropic</code>, <code>ollama</code>.</td></tr><tr><td><code>contextNoteId</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"systemPrompt\": \"string\",\n \"temperature\": 0,\n \"maxTokens\": 0,\n \"model\": \"string\",\n \"provider\": \"openai\",\n \"contextNoteId\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Chat session created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>ChatSession</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>messages</code></td><td><code>array of object</code></td></tr><tr><td><code>createdAt</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>lastActive</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>messageCount</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"sessionId\": \"string\",\n \"title\": \"string\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"string\",\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"lastActive\": \"2019-08-24T14:15:22Z\",\n \"messageCount\": 0\n}</code></pre></div></div></div></section></div><h3>Get specific chat session</h3><p><code>GET /api/llm/chat/{sessionId}</code> · <code>getChatSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Chat session details</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>ChatSession</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>messages</code></td><td><code>array of object</code></td></tr><tr><td><code>createdAt</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>lastActive</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>messageCount</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"sessionId\": \"string\",\n \"title\": \"string\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"string\",\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"lastActive\": \"2019-08-24T14:15:22Z\",\n \"messageCount\": 0\n}</code></pre></div></div></div></section></div><h3>Update chat session</h3><p><code>PATCH /api/llm/chat/{sessionId}</code> · <code>updateChatSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>systemPrompt</code></td><td><code>string</code></td></tr><tr><td><code>temperature</code></td><td><code>number</code></td></tr><tr><td><code>maxTokens</code></td><td><code>integer</code></td></tr><tr><td><code>model</code></td><td><code>string</code></td></tr><tr><td><code>provider</code></td><td><code>string</code></td></tr><tr><td><code>contextNoteId</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"systemPrompt\": \"string\",\n \"temperature\": 0,\n \"maxTokens\": 0,\n \"model\": \"string\",\n \"provider\": \"string\",\n \"contextNoteId\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Session updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>ChatSession</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>messages</code></td><td><code>array of object</code></td></tr><tr><td><code>createdAt</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>lastActive</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>messageCount</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"sessionId\": \"string\",\n \"title\": \"string\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"string\",\n \"timestamp\": \"2019-08-24T14:15:22Z\"\n }\n ],\n \"createdAt\": \"2019-08-24T14:15:22Z\",\n \"lastActive\": \"2019-08-24T14:15:22Z\",\n \"messageCount\": 0\n}</code></pre></div></div></div></section></div><h3>Delete chat session</h3><p><code>DELETE /api/llm/chat/{chatNoteId}</code> · <code>deleteChatSession</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>chatNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Session deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Send message to LLM</h3><p><code>POST /api/llm/chat/{chatNoteId}/messages</code> · <code>sendChatMessage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>options</code></td><td><code>object</code></td></tr><tr><td><code>includeContext</code></td><td><code>boolean</code></td></tr><tr><td><code>useNoteContext</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"message\": \"string\",\n \"options\": {\n \"temperature\": 0,\n \"maxTokens\": 0,\n \"model\": \"string\",\n \"provider\": \"string\"\n },\n \"includeContext\": true,\n \"useNoteContext\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: LLM response</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>response</code></td><td><code>string</code></td></tr><tr><td><code>sources</code></td><td><code>array of object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"response\": \"string\",\n \"sources\": [\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"similarity\": 0\n }\n ]\n}</code></pre></div></div></div></section></div><h3>Stream message to LLM</h3><p><code>POST /api/llm/chat/{chatNoteId}/messages/stream</code> · <code>streamChatMessage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>content</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>useAdvancedContext</code></td><td><code>boolean</code></td></tr><tr><td><code>showThinking</code></td><td><code>boolean</code></td></tr><tr><td><code>mentions</code></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"content\": \"string\",\n \"useAdvancedContext\": true,\n \"showThinking\": true,\n \"mentions\": [\n \"string\"\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Streaming started</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>List Ollama models</h3><p><code>GET /api/llm/providers/ollama/models</code> · <code>listOllamaModels</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>baseUrl</code></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Ollama models</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>models</code></td><td><code>array of object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"models\": [\n {}\n ]\n}</code></pre></div></div></div></section></div><h3>List OpenAI models</h3><p><code>GET /api/llm/providers/openai/models</code> · <code>listOpenAIModels</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: OpenAI models</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>chatModels</code></td><td><code>array of object</code></td></tr><tr><td><code>embeddingModels</code></td><td><code>array of object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"chatModels\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"type\": \"string\"\n }\n ],\n \"embeddingModels\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"type\": \"string\"\n }\n ]\n}</code></pre></div></div></div></section></div><h3>List Anthropic models</h3><p><code>GET /api/llm/providers/anthropic/models</code> · <code>listAnthropicModels</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Anthropic models</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>chatModels</code></td><td><code>array of object</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"chatModels\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"type\": \"string\"\n }\n ]\n}</code></pre></div></div></div></section></div><h2>Security</h2><p>Security features (2FA, tokens)</p><h3>Change password</h3><p><code>POST /api/password/change</code> · <code>changePassword</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>current_password</code></td><td><code>string (password)</code></td></tr><tr><td><code>new_password</code> <br><em>required</em></td><td><code>string (password)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"current_password\": \"string\",\n \"new_password\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Password changed</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Reset password (destructive)</h3><p><code>POST /api/password/reset</code> · <code>resetPassword</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>really</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Password reset</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Generate a TOTP secret</h3><p><code>GET /api/totp/generate</code> · <code>generateTotpSecret</code></p><p>Generates a fresh TOTP secret without persisting it. The caller must verify a code for this secret (see <code>/api/totp/verify</code>) and commit it (see <code>/api/totp/enable</code>) before it becomes active.</p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: TOTP secret generated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>message</code></td><td><code>string</code> <br>The bare TOTP secret (for manual entry), or an error message on failure.</td></tr><tr><td><code>url</code></td><td><code>string</code> <br>The <code>otpauth://</code> URL the authenticator expects, rendered as a QR code by the client.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"message\": \"string\",\n \"url\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Verify a generated TOTP secret</h3><p><code>POST /api/totp/verify</code> · <code>verifyTotpSecret</code></p><p>Verifies a freshly generated secret against a code the user produced for it, without persisting anything. On success, issues (unpersisted) recovery codes to be shown as the next enrollment step.</p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>secret</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>token</code> <br><em>required</em></td><td><code>string</code> <br>A TOTP code the user generated for the supplied secret.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"secret\": \"string\",\n \"token\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Verification result</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>recoveryCodes</code></td><td><code>array of string</code> <br>One-time recovery codes, present only when verification succeeds.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"recoveryCodes\": [\n \"string\"\n ]\n}</code></pre></div></div></div></section></div><h3>Enable TOTP with a verified secret</h3><p><code>POST /api/totp/enable</code> · <code>enableTotp</code></p><p>Commits a verified secret together with its recovery codes, activating TOTP. This is the final enrollment step and the only point at which the secret and recovery codes are persisted.</p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>secret</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>recoveryCodes</code> <br><em>required</em></td><td><code>array of string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"secret\": \"string\",\n \"recoveryCodes\": [\n \"string\"\n ]\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Result of enabling TOTP</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true\n}</code></pre></div></div></div></section></div><h3>Get TOTP status</h3><p><code>GET /api/totp/status</code> · <code>getTotpStatus</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: TOTP status</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>message</code></td><td><code>boolean</code> <br>Whether TOTP is the active second factor and a secret is set.</td></tr><tr><td><code>set</code></td><td><code>boolean</code> <br>Whether a TOTP secret is currently stored.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"message\": true,\n \"set\": true\n}</code></pre></div></div></div></section></div><h3>Get the stored TOTP secret</h3><p><code>GET /api/totp/get</code> · <code>getTotpSecret</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: The stored TOTP secret, or <code>null</code> if none is set.</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>string | null</code></li></ul><pre><code class=\"language-application-json\">\"string\"</code></pre></div></section></div><h3>Reset (disable) TOTP</h3><p><code>POST /api/totp/reset</code> · <code>resetTotp</code></p><p>Clears the stored TOTP secret and its recovery codes, disabling TOTP.</p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Result of resetting TOTP</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true\n}</code></pre></div></div></div></section></div><h3>Check if TOTP recovery codes are set</h3><p><code>GET /api/totp_recovery/enabled</code> · <code>isTotpRecoveryEnabled</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: TOTP recovery status</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>keysExist</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"keysExist\": true\n}</code></pre></div></div></div></section></div><h3>Regenerate TOTP recovery codes</h3><p><code>POST /api/totp_recovery/regenerate</code> · <code>regenerateTotpRecoveryCodes</code></p><p>Issues a fresh batch of recovery codes for the already-enrolled TOTP secret, replacing any existing ones, and returns them for one-time display. Refuses when no TOTP secret is set.</p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Generated recovery codes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>recoveryCodes</code></td><td><code>array of string</code> <br>New recovery codes, present only when regeneration succeeds.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"recoveryCodes\": [\n \"string\"\n ]\n}</code></pre></div></div></div></section></div><h3>Get used TOTP recovery codes</h3><p><code>GET /api/totp_recovery/used</code> · <code>getUsedTotpRecoveryCodes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Used recovery codes status. Returns an empty array if no recovery codes are set, otherwise an object listing each code's status.</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of any | object</code></li></ul><pre><code class=\"language-application-json\">[\n null\n]</code></pre></div></section></div><h3>Verify a TOTP recovery code</h3><p><code>POST /api/totp_recovery/verify</code> · <code>verifyTotpRecoveryCode</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>recovery_code_guess</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"recovery_code_guess\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Verification result</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true\n}</code></pre></div></div></div></section></div><h3>List ETAPI tokens</h3><p><code>GET /api/etapi-tokens</code> · <code>listEtapiTokens</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: ETAPI tokens</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of EtapiToken</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"etapiTokenId\": \"string\",\n \"name\": \"string\",\n \"token\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"isDeleted\": true\n }\n]</code></pre></div></section></div><h3>Create ETAPI token</h3><p><code>POST /api/etapi-tokens</code> · <code>createEtapiToken</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"name\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Token created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>EtapiToken</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>etapiTokenId</code></td><td><code>string</code></td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>token</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>isDeleted</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"etapiTokenId\": \"string\",\n \"name\": \"string\",\n \"token\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"isDeleted\": true\n}</code></pre></div></div></div></section></div><h3>Delete ETAPI token</h3><p><code>DELETE /api/etapi-tokens/{etapiTokenId}</code> · <code>deleteEtapiToken</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>etapiTokenId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Token deleted</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Update ETAPI token</h3><p><code>PATCH /api/etapi-tokens/{etapiTokenId}</code> · <code>updateEtapiToken</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>etapiTokenId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"name\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Token updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>EtapiToken</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>etapiTokenId</code></td><td><code>string</code></td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>token</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>isDeleted</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"etapiTokenId\": \"string\",\n \"name\": \"string\",\n \"token\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"isDeleted\": true\n}</code></pre></div></div></div></section></div><h2>Special Notes</h2><p>Special note types (calendar, inbox)</p><h3>Get/create inbox note</h3><p><code>GET /api/special-notes/inbox/{date}</code> · <code>getInboxNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Inbox note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Resolve where an inbox capture would go</h3><p><code>GET /api/special-notes/inbox-target</code> · <code>getInboxTarget</code></p><p>Reports the destination <code>/api/special-notes/inbox/{date}</code> would use, without creating anything. Honours the hoisted note, read from the <code>trilium-hoisted-note-id</code> header.</p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: The resolved destination</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>kind</code> <br><em>required</em></td><td><code>string</code> <br>Which rule decided the destination. <code>dayNote</code> names no note, because the day note is created when the capture happens. One of <code>inbox</code>, <code>workspaceInbox</code>, <code>workspaceRoot</code>, <code>dayNote</code>, <code>root</code>.</td></tr><tr><td><code>noteId</code></td><td><code>string</code> <br>Absent for <code>dayNote</code>.</td></tr><tr><td><code>title</code></td><td><code>string</code> <br>Absent for <code>dayNote</code>.</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"kind\": \"inbox\",\n \"noteId\": \"string\",\n \"title\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Get/create day note</h3><p><code>GET /api/special-notes/days/{date}</code> · <code>getDayNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Day note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get/create week note</h3><p><code>GET /api/special-notes/weeks/{week}</code> · <code>getWeekNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>week</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Week note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get/create month note</h3><p><code>GET /api/special-notes/months/{month}</code> · <code>getMonthNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>month</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Month note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get/create year note</h3><p><code>GET /api/special-notes/years/{year}</code> · <code>getYearNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>year</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Year note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Create SQL console note</h3><p><code>POST /api/special-notes/sql-console</code> · <code>createSqlConsole</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: SQL console created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Create search note</h3><p><code>POST /api/special-notes/search-note</code> · <code>createSearchNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Search note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Create launcher</h3><p><code>POST /api/special-notes/launchers/{parentNoteId}/{launcherType}</code> · <code>createLauncher</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>launcherType</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Launcher created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get notes for specific month</h3><p><code>GET /api/special-notes/notes-for-month/{month}</code> · <code>getNotesForMonth</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>month</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Notes for the month</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of Note</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n }\n]</code></pre></div></section></div><h3>Get quarter note</h3><p><code>GET /api/special-notes/quarters/{quarter}</code> · <code>getQuarter</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>quarter</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Quarter note</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Get first day of week for date</h3><p><code>GET /api/special-notes/week-first-day/{date}</code> · <code>getWeekFirstDay</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code> <br><em>required</em></td><td><code>string (date)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: First day of week</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>date</code></td><td><code>string (date)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"date\": \"2019-08-24\"\n}</code></pre></div></div></div></section></div><h3>Reset launcher note</h3><p><code>POST /api/special-notes/launchers/{noteId}/reset</code> · <code>resetLauncher</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Launcher reset</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Save search note</h3><p><code>POST /api/special-notes/save-search-note</code> · <code>saveSearchNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>query</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"query\": \"string\",\n \"title\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Search note saved</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Save SQL console note</h3><p><code>POST /api/special-notes/save-sql-console</code> · <code>saveSqlConsole</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sql</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"sql\": \"string\",\n \"title\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: SQL console saved</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Update API script launcher</h3><p><code>PUT /api/special-notes/api-script-launcher</code> · <code>updateApiScriptLauncher</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>code</code></td><td><code>string</code> <br>Script code</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"code\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: API script launcher updated</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h2>Visualization</h2><p>Maps and visualizations</p><h3>Get tree map</h3><p><code>POST /api/note-map/{noteId}/tree</code> · <code>getTreeMap</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Tree map data</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre></div></section></div><h3>Get link map</h3><p><code>POST /api/note-map/{noteId}/link</code> · <code>getLinkMap</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Link map data</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre></div></section></div><h3>Get backlinks</h3><p><code>GET /api/note-map/{noteId}/backlinks</code> · <code>getBacklinks</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Backlinks</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get backlink count for note</h3><p><code>GET /api/note-map/{noteId}/backlink-count</code> · <code>getBacklinkCount</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Backlink count</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>count</code></td><td><code>integer</code> <br>Number of backlinks to this note</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"count\": 0\n}</code></pre></div></div></div></section></div><h3>Get relation map data</h3><p><code>POST /api/relation-map</code> · <code>getRelationMap</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>maxDepth</code></td><td><code>integer</code></td></tr><tr><td><code>excludeArchived</code></td><td><code>boolean</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"string\",\n \"maxDepth\": 0,\n \"excludeArchived\": true\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Relation map data</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre></div></section></div><h2>External</h2><p>External integrations (clipper, sender)</p><h3>Clipper handshake</h3><p><code>GET /api/clipper/handshake</code> · <code>clipperHandshake</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Handshake successful</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>protocolVersion</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"protocolVersion\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Add web clipping</h3><p><code>POST /api/clipper/clippings</code> · <code>addClipping</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code></td></tr><tr><td><code>url</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"content\": \"string\",\n \"url\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Clipping created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Create clipper note</h3><p><code>POST /api/clipper/notes</code> · <code>createClipperNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"content\": \"string\",\n \"parentNoteId\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Note created</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Open note in clipper</h3><p><code>POST /api/clipper/open/{noteId}</code> · <code>openNoteInClipper</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note opened in clipper</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>success</code></td><td><code>boolean</code></td></tr><tr><td><code>url</code></td><td><code>string</code> <br>URL to open in clipper</td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"success\": true,\n \"url\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Sender login</h3><p><code>POST /api/sender/login</code> · <code>senderLogin</code></p><p><strong>Authorization</strong>: none</p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>username</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>password</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"username\": \"string\",\n \"password\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Login successful</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>token</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"token\": \"string\"\n}</code></pre></div></div></div></section></div><h3>Upload image from sender</h3><p><code>POST /api/sender/image</code> · <code>uploadSenderImage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>multipart/form-data</code>: <code>object</code></li></ul><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>upload</code></td><td><code>string (binary)</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Image uploaded</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h3>Save note from sender</h3><p><code>POST /api/sender/note</code> · <code>saveSenderNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"title\": \"string\",\n \"content\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">201: Note saved</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>Note</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"ur11rSfHkzeV\",\n \"title\": \"string\",\n \"type\": \"text\",\n \"mime\": \"text/html\",\n \"isProtected\": true,\n \"blobId\": \"string\",\n \"dateCreated\": \"2019-08-24T14:15:22Z\",\n \"dateModified\": \"2019-08-24T14:15:22Z\",\n \"utcDateCreated\": \"2019-08-24T14:15:22Z\",\n \"utcDateModified\": \"2019-08-24T14:15:22Z\"\n}</code></pre></div></div></div></section></div><h2>Utilities</h2><p>Miscellaneous utilities</p><h3>Get system metrics</h3><p><code>GET /api/metrics</code> · <code>getMetrics</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Query parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>format</code></td><td><code>string</code> <br>One of <code>prometheus</code>, <code>json</code>.</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: System metrics</p><div class=\"trilium-tab-panel\"><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>application/json</code>: <code>object</code></p><div class=\"trilium-tab-panel\"><pre><code class=\"language-application-json\">{}</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><code>text/plain</code>: <code>string</code></p><div class=\"trilium-tab-panel\"><p>&nbsp;</p></div></section></div></div></section></div><h3>Run system diagnostics</h3><p><code>GET /api/system-checks</code> · <code>runSystemChecks</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: System check results</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"name\": \"string\",\n \"status\": \"pass\",\n \"message\": \"string\"\n }\n]</code></pre></div></section></div><h3>Health check endpoint</h3><p><code>GET /api/health-check</code> · <code>healthCheck</code></p><p><strong>Authorization</strong>: none</p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Service is healthy</p><div class=\"trilium-tab-panel\"><ul><li><code>text/plain</code>: <code>string</code></li></ul></div></section></div><h3>Get backend log</h3><p><code>GET /api/backend-log</code> · <code>getBackendLog</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Backend log entries</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"timestamp\": \"2019-08-24T14:15:22Z\",\n \"level\": \"string\",\n \"message\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get note size</h3><p><code>GET /api/stats/note-size/{noteId}</code> · <code>getNoteSize</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Note size</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>size</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"size\": 0\n}</code></pre></div></div></div></section></div><h3>Get subtree size</h3><p><code>GET /api/stats/subtree-size/{noteId}</code> · <code>getSubtreeSize</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Subtree size</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>size</code></td><td><code>integer</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"size\": 0\n}</code></pre></div></div></div></section></div><h3>Get keyboard actions</h3><p><code>GET /api/keyboard-actions</code> · <code>getKeyboardActions</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Keyboard actions</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"actionName\": \"string\",\n \"shortcut\": \"string\",\n \"description\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get keyboard shortcuts for notes</h3><p><code>GET /api/keyboard-shortcuts-for-notes</code> · <code>getKeyboardShortcutsForNotes</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Keyboard shortcuts for notes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"shortcut\": \"string\",\n \"title\": \"string\"\n }\n]</code></pre></div></section></div><h3>Get font CSS</h3><p><code>GET /api/fonts</code> · <code>getFonts</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Font CSS</p><div class=\"trilium-tab-panel\"><ul><li><code>text/css</code>: <code>string</code></li></ul></div></section></div><h3>Add recent note</h3><p><code>POST /api/recent-notes</code> · <code>addRecentNote</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"noteId\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">204: Note added to recent</p><div class=\"trilium-tab-panel\"><p>No content.</p></div></section></div><h3>Get recent changes</h3><p><code>GET /api/recent-changes/{ancestorNoteId}</code> · <code>getRecentChanges</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Path parameters</strong></p><figure class=\"table\"><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>ancestorNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Recent changes</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>array of object</code></li></ul><pre><code class=\"language-application-json\">[\n {\n \"noteId\": \"string\",\n \"title\": \"string\",\n \"dateModified\": \"2019-08-24T14:15:22Z\"\n }\n]</code></pre></div></section></div><h3>Get icon usage statistics</h3><p><code>GET /api/other/icon-usage</code> · <code>getIconUsage</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Icon usage stats</p><div class=\"trilium-tab-panel\"><ul><li><code>application/json</code>: <code>object</code></li></ul><pre><code class=\"language-application-json\">{}</code></pre></div></section></div><h3>Render markdown to HTML</h3><p><code>POST /api/other/render-markdown</code> · <code>renderMarkdown</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>markdownContent</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"markdownContent\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: Rendered HTML</p><div class=\"trilium-tab-panel\"><ul><li><code>text/html</code>: <code>string</code></li></ul></div></section></div><h3>Renders given HTML to Markdown</h3><p><code>POST /api/other/to-markdown</code> · <code>toMarkdown</code></p><p><strong>Authorization</strong>: <code>sessionAuth</code> or <code>tokenAuth</code></p><p><strong>Request body</strong> (required)</p><ul><li><code>application/json</code>: <code>object</code></li></ul><div class=\"trilium-multicolumn-layout\" data-trilium-column-ratios=\"1-1\"><div class=\"trilium-multicolumn-column\"><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>htmlContent</code> <br><em>required</em></td><td><code>string</code></td></tr></tbody></table></figure></div><div class=\"trilium-multicolumn-column\"><pre><code class=\"language-application-json\">{\n \"htmlContent\": \"string\"\n}</code></pre></div></div><p><strong>Responses</strong></p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">200: The input text rendered as Markdown</p><div class=\"trilium-tab-panel\"><ul><li><code>text/plain</code>: <code>string</code></li></ul></div></section></div><h2>Schemas</h2><h3><code>Note</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code> <br>12-character note ID</td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code> <br>Note title</td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code> <br>MIME type</td></tr><tr><td><code>isProtected</code> <br><em>required</em></td><td><code>boolean</code> <br>Whether note is protected</td></tr><tr><td><code>blobId</code></td><td><code>string</code> <br>ID of content blob</td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure><h3><code>NoteType</code></h3><p>Type: <code>string</code></p><h3><code>Branch</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>branchId</code> <br><em>required</em></td><td><code>string</code> <br>Branch ID (parentNoteId_noteId)</td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>notePosition</code> <br><em>required</em></td><td><code>integer</code></td></tr><tr><td><code>prefix</code></td><td><code>string | null</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr></tbody></table></figure><h3><code>Attribute</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attributeId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>noteId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>label</code>, <code>relation</code>.</td></tr><tr><td><code>name</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>value</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>position</code></td><td><code>integer</code></td></tr><tr><td><code>isInheritable</code></td><td><code>boolean</code></td></tr></tbody></table></figure><h3><code>Attachment</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>attachmentId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>ownerId</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>role</code> <br><em>required</em></td><td><code>string</code> <br>One of <code>image</code>, <code>file</code>.</td></tr><tr><td><code>mime</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>blobId</code></td><td><code>string</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure><h3><code>Revision</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>revisionId</code></td><td><code>string</code></td></tr><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>type</code></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure><h3><code>SearchResult</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>path</code></td><td><code>string</code></td></tr><tr><td><code>score</code></td><td><code>number</code></td></tr><tr><td><code>highlights</code></td><td><code>array of string</code></td></tr></tbody></table></figure><h3><code>EntityChange</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>entityChange</code></td><td><code>object</code></td></tr><tr><td><code>entity</code></td><td><code>object</code></td></tr></tbody></table></figure><h3><code>Timestamps</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>dateModified</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>utcDateModified</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure><h3><code>CreateNoteRequest</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code> <br><em>required</em></td><td><code>string</code></td></tr><tr><td><code>content</code></td><td><code>string</code></td></tr><tr><td><code>type</code> <br><em>required</em></td><td><code>NoteType</code> <br>One of <code>text</code>, <code>code</code>, <code>render</code>, <code>file</code>, <code>image</code>, <code>search</code>, <code>relationMap</code>, <code>book</code>, <code>noteMap</code>, <code>mermaid</code>, <code>canvas</code>, <code>webView</code>, <code>launcher</code>, <code>doc</code>, <code>contentWidget</code>, <code>mindMap</code>, <code>geoMap</code>.</td></tr><tr><td><code>mime</code></td><td><code>string</code></td></tr><tr><td><code>isProtected</code></td><td><code>boolean</code></td></tr><tr><td><code>isExpanded</code></td><td><code>boolean</code></td></tr><tr><td><code>notePosition</code></td><td><code>integer</code></td></tr><tr><td><code>prefix</code></td><td><code>string</code></td></tr><tr><td><code>parentNoteId</code></td><td><code>string</code></td></tr><tr><td><code>templateNoteId</code></td><td><code>string</code></td></tr></tbody></table></figure><h3><code>ScriptBundle</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>noteId</code></td><td><code>string</code></td></tr><tr><td><code>script</code></td><td><code>string</code></td></tr><tr><td><code>html</code></td><td><code>string</code></td></tr><tr><td><code>css</code></td><td><code>string</code></td></tr></tbody></table></figure><h3><code>AppInfo</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>appVersion</code></td><td><code>string</code></td></tr><tr><td><code>dbVersion</code></td><td><code>integer</code></td></tr><tr><td><code>nodeVersion</code></td><td><code>string</code></td></tr><tr><td><code>syncVersion</code></td><td><code>integer</code></td></tr><tr><td><code>buildDate</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>buildRevision</code></td><td><code>string</code></td></tr><tr><td><code>dataDirectory</code></td><td><code>string</code></td></tr><tr><td><code>clipperProtocolVersion</code></td><td><code>string</code></td></tr><tr><td><code>utcDateTime</code></td><td><code>string (date-time)</code></td></tr></tbody></table></figure><h3><code>ChatSession</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>sessionId</code></td><td><code>string</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td></tr><tr><td><code>messages</code></td><td><code>array of object</code></td></tr><tr><td><code>createdAt</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>lastActive</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>messageCount</code></td><td><code>integer</code></td></tr></tbody></table></figure><h3><code>EtapiToken</code></h3><figure class=\"table\"><table><thead><tr><th>Property</th><th>Description</th></tr></thead><tbody><tr><td><code>etapiTokenId</code></td><td><code>string</code></td></tr><tr><td><code>name</code></td><td><code>string</code></td></tr><tr><td><code>token</code></td><td><code>string</code></td></tr><tr><td><code>dateCreated</code></td><td><code>string (date-time)</code></td></tr><tr><td><code>isDeleted</code></td><td><code>boolean</code></td></tr></tbody></table></figure>",
"_help_2mUhVmZK8RF3": "<figure class=\"image image-style-align-right\"><img style=\"aspect-ratio:263/445;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Hidden%20Notes_image.png\" width=\"263\" height=\"445\"></figure><p>For easy extensibility, a lot of features in Trilium make use of actual notes to store information as opposed to having them stored in a separate location in the database. This allows some functions such as&nbsp;<a class=\"reference-link\" href=\"#root/_help_zEY4DaJG4YT5\">Attributes</a>,&nbsp;<a class=\"reference-link\" href=\"#root/_help_Cq5X6iKQop6R\">Relations</a>&nbsp;or even&nbsp;<a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>&nbsp;and&nbsp;<a class=\"reference-link\" href=\"#root/_help_QEAPj01N5f7w\">Links</a>&nbsp;to be able to operate on them.</p><p>As the name suggests, these notes are hidden to the user by default to prevent cluttering the note tree and to prevent them from being accidentally deleted.</p><p>The hidden notes are stored in the user's&nbsp;<a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a>&nbsp;just like normal notes, but they have a unique&nbsp;<a class=\"reference-link\" href=\"#root/_help_m1lbrzyKDaRB\">Note ID</a>&nbsp;which allows them to be distinguished from the normal ones.</p><h2>Accessing the hidden note tree</h2><p>From the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>, select <em>Advanced</em> → <em>Show hidden subtree</em>.</p><h2>Contents of the hidden note tree</h2><p>Here is a brief summary of all the notes within the hidden tree:</p><figure class=\"table\"><table class=\"ck-table-resized\"><colgroup><col style=\"width:19.93%;\"><col style=\"width:80.07%;\"></colgroup><thead><tr><th>Note</th><th>Description</th></tr></thead><tbody><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_globalNoteMap\">Note Map</a></td><td><p>This note is actually opened when the&nbsp;<a class=\"reference-link\" href=\"#root/_help_bdUJEHsAPYQR\">Note Map</a>&nbsp;feature that is accessed from the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</p><p>It is possible to create any child notes in it without any additional meaning. For example, it can be used to store a list of note maps which can be linked to from other notes or <a href=\"#root/_help_u3YFHC9tQlpm\">bookmarked</a>.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_sqlConsole\">SQL Console History</a></td><td><p>When SQL queries or commands are executed in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_YKWqdJhzi2VY\">SQL Console</a>, they are stored here, grouped by month. Only the query is stored and not the results.</p><p>This section can be accessed without going to the hidden tree by simply going to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;and selecting Advanced → Open SQL console history.</p><p>Notes can be added as children of this tree, but it's generally not recommended to do so to not interfere with the normal history process.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_search\">Search History</a></td><td><p>Whenever a search is executed from the full&nbsp;<a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>, the query will be stored here, grouped by month. Only the search parameters are stored and not the results themselves.</p><p>This section can be accessed without going to the hidden tree by simply going to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;and selecting Advanced → Open search history.</p><p>Notes can be added as children of this tree, but it's generally not recommended to do so to not interfere with the normal history process.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_bulkAction\">Bulk Action</a></td><td><p>This section is used for&nbsp;<a class=\"reference-link\" href=\"#root/_help_ivYnonVFBxbQ\">Bulk Actions</a>. The last configuration for bulk actions will be stored as part of this note, each action in its own <code>action</code> label.</p><p>Notes can be added as children of this tree, but there won't be any benefit in doing so.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_backendLog\">Backend Log</a></td><td><p>This note corresponds to the backend log feature (see&nbsp;<a class=\"reference-link\" href=\"#root/_help_qzNzp9LYQyPT\">Error logs</a>).</p><p>This item can be accessed without going to the hidden try by going to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;and selecting Advanced → Show backend log.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_userHidden\">User Hidden</a></td><td>This section can be used by <a href=\"#root/_help_CdNpE2pqjmI6\">scripts</a> to create their own notes that should not be directly visible to the user. The note can be identified by scripts by its unique ID: <code>_userHidden</code></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_lbTplRoot\">Launch Bar Templates</a></td><td><p>This section contains the templates for the creation of launchers in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>. It is not possible to create child notes here.</p><p>Theoretically some of the notes here can be customized, but there's not much benefit to be had in doing so.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_share\">Shared Notes</a></td><td><p>This tree lists all of the notes that are <a href=\"#root/_help_R9pX4DGra2Vt\">shared</a> publicly. It can be useful to track down which notes are shared regardless of their position in the note tree.</p><p>This section can be accessed without going to the hidden tree simply by going to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;and selecting <em>Show shared notes subtree</em>.</p><p>Sub-notes cannot be created here.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_lbRoot\">Launch Bar</a></td><td><p>The tree contains both available and displayed items of the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</p><p>This section can be accessed without going to the hidden tree by:</p><ul><li>Going to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;and selecting <em>Configure launch bar…</em>.</li><li>Right-clicking an empty space on the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>&nbsp;and selecting <em>Configure launch bar…</em>.</li></ul><p>Sub-notes cannot be created here.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_options\">Options</a></td><td><p>This section stores the list of&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>.</p><p>This section can be accessed without going to the hidden tree by:</p><ul><li>Going to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;and selecting <em>Options</em>.</li><li>Pressing the dedicated Options icon in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_lbMobileRoot\">Mobile Launch Bar</a></td><td><p>This is very similar to the <em>Launch Bar</em>, but is dedicated for the mobile UI only.</p><p>Accessing it outside the <em>Launch Bar</em> is the same as the Launch Bar, but needs to be done so from the mobile interface.</p></td></tr><tr><td><a class=\"reference-link\" href=\"#root/_hidden/_help\">User Guide</a></td><td>This is where the User Guide appears in the note tree. Its notes are not stored in the database: Trilium builds them from files that ship with the application each time it starts, so they cannot be edited, moved or cloned, and they are not synchronized.</td></tr></tbody></table></figure>",
"_help_uYF7pmepw27K": "<p>The Trilium Metrics API provides comprehensive monitoring data about your Trilium instance, designed for external monitoring systems like Prometheus.</p><h2>Endpoint</h2><ul><li><strong>URL</strong>: <code>/etapi/metrics</code></li><li><strong>Method</strong>: <code>GET</code></li><li><strong>Authentication</strong>: ETAPI token required</li><li><strong>Default Format</strong>: Prometheus text format</li></ul><h2>Authentication</h2><p>You need an ETAPI token to access the metrics endpoint. Get one by:</p><pre><code class=\"language-text-x-trilium-auto\"># Get an ETAPI token\ncurl -X POST http://localhost:8080/etapi/auth/login \\\n -H \"Content-Type: application/json\" \\\n -d '{\"password\": \"your_password\"}'\n</code></pre><h2>Usage</h2><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Prometheus Format (Default)</p><div class=\"trilium-tab-panel\"><pre><code class=\"language-text-x-trilium-auto\">curl -H \"Authorization: YOUR_ETAPI_TOKEN\" \\\n http://localhost:8080/etapi/metrics\n</code></pre><p>Returns metrics in Prometheus text format:</p><pre><code class=\"language-text-x-trilium-auto\"># HELP trilium_info Trilium instance information\n# TYPE trilium_info gauge\ntrilium_info{version=\"0.91.6\",db_version=\"231\",node_version=\"v18.17.0\"} 1 1701432000\n\n# HELP trilium_notes_total Total number of notes including deleted\n# TYPE trilium_notes_total gauge\ntrilium_notes_total 1234 1701432000</code></pre></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">JSON Format</p><div class=\"trilium-tab-panel\"><pre><code class=\"language-text-x-trilium-auto\">curl -H \"Authorization: YOUR_ETAPI_TOKEN\" \\\n \"http://localhost:8080/etapi/metrics?format=json\"\n</code></pre><p>Returns detailed metrics in JSON format for debugging or custom integrations.</p></div></section></div><h2>Available Metrics</h2><h3>Instance Information</h3><ul><li><code>trilium_info</code> - Version and build information with labels</li></ul><h3>Database Metrics</h3><ul><li><code>trilium_notes_total</code> - Total notes (including deleted)</li><li><code>trilium_notes_deleted</code> - Number of deleted notes</li><li><code>trilium_notes_active</code> - Number of active notes</li><li><code>trilium_notes_protected</code> - Number of protected notes</li><li><code>trilium_attachments_total</code> - Total attachments</li><li><code>trilium_attachments_active</code> - Active attachments</li><li><code>trilium_revisions_total</code> - Total note revisions</li><li><code>trilium_branches_total</code> - Active branches</li><li><code>trilium_attributes_total</code> - Active attributes</li><li><code>trilium_blobs_total</code> - Total blob records</li><li><code>trilium_etapi_tokens_total</code> - Active ETAPI tokens</li><li><code>trilium_embeddings_total</code> - Note embeddings (if available)</li></ul><h3>Categorized Metrics</h3><ul><li><code>trilium_notes_by_type{type=\"text|code|image|file\"}</code> - Notes by type</li><li><code>trilium_attachments_by_type{mime_type=\"...\"}</code> - Attachments by MIME type</li></ul><h3>Statistics</h3><ul><li><code>trilium_database_size_bytes</code> - Database size in bytes</li><li><code>trilium_oldest_note_timestamp</code> - Timestamp of oldest note</li><li><code>trilium_newest_note_timestamp</code> - Timestamp of newest note</li><li><code>trilium_last_modified_timestamp</code> - Last modification timestamp</li></ul><h2>Prometheus Configuration</h2><p>Add to your <code>prometheus.yml</code>:</p><pre><code class=\"language-text-x-trilium-auto\">scrape_configs:\n - job_name: 'trilium'\n static_configs:\n - targets: ['localhost:8080']\n metrics_path: '/etapi/metrics'\n bearer_token: 'YOUR_ETAPI_TOKEN'\n scrape_interval: 30s\n</code></pre><h2>Error Responses</h2><ul><li><code>400</code> - Invalid format parameter</li><li><code>401</code> - Missing or invalid ETAPI token</li><li><code>500</code> - Internal server error</li></ul><h2>Grafana Dashboard</h2><figure class=\"image\"><img style=\"aspect-ratio:2594/1568;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/1_Metrics_image.png\" width=\"2594\" height=\"1568\"></figure><p>You can also use the Grafana Dashboard that has been created for TriliumNext - just take the JSON from&nbsp;<a class=\"reference-link\" href=\"#root/_help_bOP3TB56fL1V\">grafana-dashboard.json</a>&nbsp;and then import the dashboard, following these screenshots:</p><figure class=\"image\"><img style=\"aspect-ratio:1881/282;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/2_Metrics_image.png\" width=\"1881\" height=\"282\"></figure><p>Then paste the JSON, and hit load:</p><figure class=\"image\"><img style=\"aspect-ratio:1055/830;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Metrics_image.png\" width=\"1055\" height=\"830\"></figure>",
"_help_bOP3TB56fL1V": "{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": {\n \"type\": \"grafana\",\n \"uid\": \"-- Grafana --\"\n },\n \"enable\": true,\n \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\n }\n ]\n },\n \"editable\": true,\n \"fiscalYearStartMonth\": 0,\n \"graphTooltip\": 1,\n \"id\": 549,\n \"links\": [],\n \"panels\": [\n {\n \"collapsed\": false,\n \"gridPos\": {\n \"h\": 1,\n \"w\": 24,\n \"x\": 0,\n \"y\": 0\n },\n \"id\": 100,\n \"panels\": [],\n \"title\": \"🏠 Trilium Overview\",\n \"type\": \"row\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Current Trilium version and build information\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"custom\": {\n \"align\": \"auto\",\n \"cellOptions\": {\n \"type\": \"auto\"\n },\n \"filterable\": false,\n \"inspect\": false\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n }\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 6,\n \"w\": 12,\n \"x\": 0,\n \"y\": 1\n },\n \"id\": 101,\n \"options\": {\n \"cellHeight\": \"sm\",\n \"footer\": {\n \"countRows\": false,\n \"fields\": \"\",\n \"reducer\": [\n \"sum\"\n ],\n \"show\": false\n },\n \"showHeader\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_info{job=~'$job',instance=~'$instance'}\",\n \"format\": \"table\",\n \"instant\": true,\n \"refId\": \"A\"\n }\n ],\n \"title\": \"📋 Instance Information\",\n \"transformations\": [\n {\n \"id\": \"organize\",\n \"options\": {\n \"excludeByName\": {\n \"Time\": true,\n \"Value\": true,\n \"__name__\": true,\n \"instance\": true,\n \"job\": true\n },\n \"indexByName\": {},\n \"renameByName\": {\n \"build_date\": \"Build Date\",\n \"build_revision\": \"Git Revision\",\n \"db_version\": \"DB Version\",\n \"node_version\": \"Node.js\",\n \"sync_version\": \"Sync Version\",\n \"version\": \"Version\"\n }\n }\n }\n ],\n \"type\": \"table\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Database file size in human-readable format\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n },\n {\n \"color\": \"yellow\",\n \"value\": 500000000\n },\n {\n \"color\": \"red\",\n \"value\": 1000000000\n }\n ]\n },\n \"unit\": \"decbytes\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 12,\n \"y\": 1\n },\n \"id\": 102,\n \"options\": {\n \"colorMode\": \"background\",\n \"graphMode\": \"area\",\n \"justifyMode\": \"center\",\n \"orientation\": \"auto\",\n \"percentChangeColorMode\": \"standard\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"showPercentChange\": false,\n \"textMode\": \"auto\",\n \"wideLayout\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_database_size_bytes{job=~'$job',instance=~'$instance'}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"💾 Database Size\",\n \"type\": \"stat\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Total active notes in your Trilium instance\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n },\n {\n \"color\": \"yellow\",\n \"value\": 1000\n },\n {\n \"color\": \"red\",\n \"value\": 5000\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 18,\n \"y\": 1\n },\n \"id\": 103,\n \"options\": {\n \"colorMode\": \"background\",\n \"graphMode\": \"area\",\n \"justifyMode\": \"center\",\n \"orientation\": \"auto\",\n \"percentChangeColorMode\": \"standard\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"showPercentChange\": false,\n \"textMode\": \"auto\",\n \"wideLayout\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_active{job=~'$job',instance=~'$instance'}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"📝 Active Notes\",\n \"type\": \"stat\"\n },\n {\n \"collapsed\": false,\n \"gridPos\": {\n \"h\": 1,\n \"w\": 24,\n \"x\": 0,\n \"y\": 7\n },\n \"id\": 200,\n \"panels\": [],\n \"title\": \"📊 Key Metrics\",\n \"type\": \"row\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Total notes including deleted ones\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n }\n },\n \"mappings\": [],\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 6,\n \"x\": 0,\n \"y\": 8\n },\n \"id\": 201,\n \"options\": {\n \"legend\": {\n \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \"showLegend\": true,\n \"values\": []\n },\n \"pieType\": \"pie\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"single\",\n \"sort\": \"none\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_active{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Active Notes\",\n \"refId\": \"A\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_deleted{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Deleted Notes\",\n \"refId\": \"B\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_protected{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Protected Notes\",\n \"refId\": \"C\"\n }\n ],\n \"title\": \"📝 Notes Distribution\",\n \"type\": \"piechart\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Breakdown of attachments by MIME type\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n }\n },\n \"mappings\": [],\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 6,\n \"x\": 6,\n \"y\": 8\n },\n \"id\": 202,\n \"options\": {\n \"legend\": {\n \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \"showLegend\": true,\n \"values\": []\n },\n \"pieType\": \"donut\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"single\",\n \"sort\": \"none\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_attachments_by_type{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"{{mime_type}}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"🖼️ Attachments by Type\",\n \"type\": \"piechart\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Distribution of notes by their content type\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n }\n },\n \"mappings\": [],\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 8\n },\n \"id\": 203,\n \"options\": {\n \"legend\": {\n \"displayMode\": \"table\",\n \"placement\": \"right\",\n \"showLegend\": true,\n \"values\": [\n \"value\",\n \"percent\"\n ]\n },\n \"pieType\": \"donut\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"single\",\n \"sort\": \"none\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_by_type{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"{{type}}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"📄 Notes by Content Type\",\n \"type\": \"piechart\"\n },\n {\n \"collapsed\": false,\n \"gridPos\": {\n \"h\": 1,\n \"w\": 24,\n \"x\": 0,\n \"y\": 16\n },\n \"id\": 300,\n \"panels\": [],\n \"title\": \"📈 Trends & Time Series\",\n \"type\": \"row\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Growth of notes over time\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \"barWidthFactor\": 0.6,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 20,\n \"gradientMode\": \"hue\",\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n },\n \"insertNulls\": false,\n \"lineInterpolation\": \"smooth\",\n \"lineWidth\": 3,\n \"pointSize\": 8,\n \"scaleDistribution\": {\n \"type\": \"linear\"\n },\n \"showPoints\": \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \"group\": \"A\",\n \"mode\": \"none\"\n },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n }\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": [\n {\n \"matcher\": {\n \"id\": \"byName\",\n \"options\": \"Active Notes\"\n },\n \"properties\": [\n {\n \"id\": \"color\",\n \"value\": {\n \"fixedColor\": \"blue\",\n \"mode\": \"fixed\"\n }\n }\n ]\n },\n {\n \"matcher\": {\n \"id\": \"byName\",\n \"options\": \"Total Notes\"\n },\n \"properties\": [\n {\n \"id\": \"color\",\n \"value\": {\n \"fixedColor\": \"green\",\n \"mode\": \"fixed\"\n }\n }\n ]\n }\n ]\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n },\n \"id\": 301,\n \"options\": {\n \"legend\": {\n \"calcs\": [\n \"last\",\n \"max\"\n ],\n \"displayMode\": \"table\",\n \"placement\": \"bottom\",\n \"showLegend\": true\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"multi\",\n \"sort\": \"desc\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_active{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Active Notes\",\n \"refId\": \"A\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_notes_total{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Total Notes\",\n \"refId\": \"B\"\n }\n ],\n \"title\": \"📈 Notes Growth Over Time\",\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Attachment storage trends\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \"barWidthFactor\": 0.6,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 20,\n \"gradientMode\": \"hue\",\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n },\n \"insertNulls\": false,\n \"lineInterpolation\": \"smooth\",\n \"lineWidth\": 3,\n \"pointSize\": 8,\n \"scaleDistribution\": {\n \"type\": \"linear\"\n },\n \"showPoints\": \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \"group\": \"A\",\n \"mode\": \"none\"\n },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n }\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": [\n {\n \"matcher\": {\n \"id\": \"byName\",\n \"options\": \"Active Attachments\"\n },\n \"properties\": [\n {\n \"id\": \"color\",\n \"value\": {\n \"fixedColor\": \"purple\",\n \"mode\": \"fixed\"\n }\n }\n ]\n },\n {\n \"matcher\": {\n \"id\": \"byName\",\n \"options\": \"Total Attachments\"\n },\n \"properties\": [\n {\n \"id\": \"color\",\n \"value\": {\n \"fixedColor\": \"orange\",\n \"mode\": \"fixed\"\n }\n }\n ]\n }\n ]\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 17\n },\n \"id\": 302,\n \"options\": {\n \"legend\": {\n \"calcs\": [\n \"last\",\n \"max\"\n ],\n \"displayMode\": \"table\",\n \"placement\": \"bottom\",\n \"showLegend\": true\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"multi\",\n \"sort\": \"desc\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_attachments_active{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Active Attachments\",\n \"refId\": \"A\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_attachments_total{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Total Attachments\",\n \"refId\": \"B\"\n }\n ],\n \"title\": \"📎 Attachments Growth Over Time\",\n \"type\": \"timeseries\"\n },\n {\n \"collapsed\": false,\n \"gridPos\": {\n \"h\": 1,\n \"w\": 24,\n \"x\": 0,\n \"y\": 25\n },\n \"id\": 400,\n \"panels\": [],\n \"title\": \"🔧 Advanced Metrics\",\n \"type\": \"row\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Number of branches connecting notes\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 4,\n \"w\": 6,\n \"x\": 0,\n \"y\": 26\n },\n \"id\": 401,\n \"options\": {\n \"colorMode\": \"value\",\n \"graphMode\": \"none\",\n \"justifyMode\": \"center\",\n \"orientation\": \"auto\",\n \"percentChangeColorMode\": \"standard\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"showPercentChange\": false,\n \"textMode\": \"auto\",\n \"wideLayout\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_branches_total{job=~'$job',instance=~'$instance'}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"🌳 Total Branches\",\n \"type\": \"stat\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Number of note attributes\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 4,\n \"w\": 6,\n \"x\": 6,\n \"y\": 26\n },\n \"id\": 402,\n \"options\": {\n \"colorMode\": \"value\",\n \"graphMode\": \"none\",\n \"justifyMode\": \"center\",\n \"orientation\": \"auto\",\n \"percentChangeColorMode\": \"standard\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"showPercentChange\": false,\n \"textMode\": \"auto\",\n \"wideLayout\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_attributes_total{job=~'$job',instance=~'$instance'}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"🏷️ Attributes\",\n \"type\": \"stat\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Number of note revisions\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 4,\n \"w\": 6,\n \"x\": 12,\n \"y\": 26\n },\n \"id\": 403,\n \"options\": {\n \"colorMode\": \"value\",\n \"graphMode\": \"none\",\n \"justifyMode\": \"center\",\n \"orientation\": \"auto\",\n \"percentChangeColorMode\": \"standard\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"showPercentChange\": false,\n \"textMode\": \"auto\",\n \"wideLayout\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_revisions_total{job=~'$job',instance=~'$instance'}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"🔄 Revisions\",\n \"type\": \"stat\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Number of ETAPI tokens\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"thresholds\"\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 4,\n \"w\": 6,\n \"x\": 18,\n \"y\": 26\n },\n \"id\": 404,\n \"options\": {\n \"colorMode\": \"value\",\n \"graphMode\": \"none\",\n \"justifyMode\": \"center\",\n \"orientation\": \"auto\",\n \"percentChangeColorMode\": \"standard\",\n \"reduceOptions\": {\n \"calcs\": [\n \"lastNotNull\"\n ],\n \"fields\": \"\",\n \"values\": false\n },\n \"showPercentChange\": false,\n \"textMode\": \"auto\",\n \"wideLayout\": true\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_etapi_tokens_total{job=~'$job',instance=~'$instance'}\",\n \"refId\": \"A\"\n }\n ],\n \"title\": \"🔑 API Tokens\",\n \"type\": \"stat\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Various storage and system metrics\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \"barWidthFactor\": 0.6,\n \"drawStyle\": \"line\",\n \"fillOpacity\": 10,\n \"gradientMode\": \"none\",\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n },\n \"insertNulls\": false,\n \"lineInterpolation\": \"linear\",\n \"lineWidth\": 2,\n \"pointSize\": 5,\n \"scaleDistribution\": {\n \"type\": \"linear\"\n },\n \"showPoints\": \"auto\",\n \"spanNulls\": false,\n \"stacking\": {\n \"group\": \"A\",\n \"mode\": \"none\"\n },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n }\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"short\"\n },\n \"overrides\": [\n {\n \"matcher\": {\n \"id\": \"byName\",\n \"options\": \"Recent Notes\"\n },\n \"properties\": [\n {\n \"id\": \"color\",\n \"value\": {\n \"fixedColor\": \"yellow\",\n \"mode\": \"fixed\"\n }\n }\n ]\n }\n ]\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 30\n },\n \"id\": 405,\n \"options\": {\n \"legend\": {\n \"calcs\": [\n \"last\"\n ],\n \"displayMode\": \"table\",\n \"placement\": \"bottom\",\n \"showLegend\": true\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"multi\",\n \"sort\": \"desc\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_blobs_total{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Blob Records\",\n \"refId\": \"A\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_recent_notes_total{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Recent Notes\",\n \"refId\": \"B\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_embeddings_total{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Embeddings\",\n \"refId\": \"C\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_embedding_providers_total{job=~'$job',instance=~'$instance'}\",\n \"legendFormat\": \"Embedding Providers\",\n \"refId\": \"D\"\n }\n ],\n \"title\": \"📊 Storage & System Metrics\",\n \"type\": \"timeseries\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"description\": \"Timeline showing when content was created and last modified\",\n \"fieldConfig\": {\n \"defaults\": {\n \"color\": {\n \"mode\": \"palette-classic\"\n },\n \"custom\": {\n \"axisBorderShow\": false,\n \"axisCenteredZero\": false,\n \"axisColorMode\": \"text\",\n \"axisLabel\": \"\",\n \"axisPlacement\": \"auto\",\n \"barAlignment\": 0,\n \"barWidthFactor\": 0.6,\n \"drawStyle\": \"points\",\n \"fillOpacity\": 0,\n \"gradientMode\": \"none\",\n \"hideFrom\": {\n \"legend\": false,\n \"tooltip\": false,\n \"viz\": false\n },\n \"insertNulls\": false,\n \"lineInterpolation\": \"linear\",\n \"lineWidth\": 1,\n \"pointSize\": 8,\n \"scaleDistribution\": {\n \"type\": \"linear\"\n },\n \"showPoints\": \"always\",\n \"spanNulls\": false,\n \"stacking\": {\n \"group\": \"A\",\n \"mode\": \"none\"\n },\n \"thresholdsStyle\": {\n \"mode\": \"off\"\n }\n },\n \"mappings\": [],\n \"thresholds\": {\n \"mode\": \"absolute\",\n \"steps\": [\n {\n \"color\": \"green\"\n }\n ]\n },\n \"unit\": \"dateTimeAsIso\"\n },\n \"overrides\": []\n },\n \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 12,\n \"y\": 30\n },\n \"id\": 406,\n \"options\": {\n \"legend\": {\n \"calcs\": [],\n \"displayMode\": \"list\",\n \"placement\": \"bottom\",\n \"showLegend\": true\n },\n \"tooltip\": {\n \"hideZeros\": false,\n \"mode\": \"single\",\n \"sort\": \"none\"\n }\n },\n \"pluginVersion\": \"12.0.1\",\n \"targets\": [\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_oldest_note_timestamp{job=~'$job',instance=~'$instance'} * 1000\",\n \"legendFormat\": \"Oldest Note\",\n \"refId\": \"A\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_newest_note_timestamp{job=~'$job',instance=~'$instance'} * 1000\",\n \"legendFormat\": \"Newest Note\",\n \"refId\": \"B\"\n },\n {\n \"datasource\": {\n \"uid\": \"${datasource}\"\n },\n \"expr\": \"trilium_last_modified_timestamp{job=~'$job',instance=~'$instance'} * 1000\",\n \"legendFormat\": \"Last Modified\",\n \"refId\": \"C\"\n }\n ],\n \"title\": \"⏰ Content Timeline\",\n \"type\": \"timeseries\"\n }\n ],\n \"preload\": false,\n \"refresh\": \"1m\",\n \"schemaVersion\": 41,\n \"tags\": [\n \"trilium\",\n \"notes\",\n \"monitoring\",\n \"enhanced\"\n ],\n \"templating\": {\n \"list\": [\n {\n \"current\": {\n \"text\": \"myprom\",\n \"value\": \"PA04845DA3A4B088E\"\n },\n \"includeAll\": false,\n \"label\": \"Datasource\",\n \"name\": \"datasource\",\n \"options\": [],\n \"query\": \"prometheus\",\n \"refresh\": 1,\n \"regex\": \"//\",\n \"type\": \"datasource\"\n },\n {\n \"allValue\": \".*\",\n \"current\": {\n \"text\": \"All\",\n \"value\": \"$__all\"\n },\n \"datasource\": {\n \"UID\": \"\",\n \"type\": \"\"\n },\n \"includeAll\": true,\n \"label\": \"Job\",\n \"multi\": true,\n \"name\": \"job\",\n \"options\": [],\n \"query\": \"query_result(up)\",\n \"refresh\": 1,\n \"regex\": \"/job=\\\"([^\\\"]+)\\\"/\",\n \"sort\": 1,\n \"type\": \"query\"\n },\n {\n \"allValue\": \".*\",\n \"current\": {\n \"text\": [\n \"All\"\n ],\n \"value\": [\n \"$__all\"\n ]\n },\n \"datasource\": {\n \"type\": \"prometheus\",\n \"uid\": \"${datasource}\"\n },\n \"includeAll\": true,\n \"label\": \"Instance\",\n \"multi\": true,\n \"name\": \"instance\",\n \"options\": [],\n \"query\": \"trilium_database_size_bytes\",\n \"refresh\": 1,\n \"regex\": \"/instance=\\\"([^\\\"]+)\\\"/\",\n \"sort\": 1,\n \"type\": \"query\"\n }\n ]\n },\n \"time\": {\n \"from\": \"now-1h\",\n \"to\": \"now\"\n },\n \"timepicker\": {},\n \"timezone\": \"browser\",\n \"title\": \"TriliumNext Dashboard\",\n \"uid\": \"06993f9b-a477-4723-bf18-47743393b382\",\n \"version\": 5\n}",
diff --git a/docs/User Guide/User Guide/Advanced Usage/ETAPI (REST API)/API Reference.md b/docs/User Guide/User Guide/Advanced Usage/ETAPI (REST API)/API Reference.md
index cf3486dd7a..6e2fb0f31e 100644
--- a/docs/User Guide/User Guide/Advanced Usage/ETAPI (REST API)/API Reference.md
+++ b/docs/User Guide/User Guide/Advanced Usage/ETAPI (REST API)/API Reference.md
@@ -32,21 +32,21 @@ Create a note and place it into the note tree
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `parentNoteId` <br>_required_ | `EntityId` | Note ID of the parent note in the tree |
-| `title` <br>_required_ | `string` | |
-| `type` <br>_required_ | `string` | One of `text`, `code`, `file`, `image`, `search`, `book`, `relationMap`, `render`. |
-| `mime` | `string` | this needs to be specified only for note types 'code', 'file', 'image'. |
-| `content` <br>_required_ | `string` | |
-| `notePosition` | `integer` | Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000 |
-| `prefix` | `string` | Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix. |
-| `isExpanded` | `boolean` | true if this note (as a folder) should appear expanded |
-| `noteId` | `EntityId` | DON'T specify unless you want to force a specific noteId |
-| `branchId` | `EntityId` | DON'T specify unless you want to force a specific branchId |
-| `dateCreated` | `LocalDateTime` | Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset). |
-| `utcDateCreated` | `UtcDateTime` | UTC timestap of the note creation. Specify only if you want to override the default (current datetime). |
-| `utcDateModified` | `UtcDateTime` | UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime). |
+| Property | Description |
+| --- | --- |
+| `parentNoteId` <br>_required_ | `EntityId` <br>Note ID of the parent note in the tree |
+| `title` <br>_required_ | `string` |
+| `type` <br>_required_ | `string` <br>One of `text`, `code`, `file`, `image`, `search`, `book`, `relationMap`, `render`. |
+| `mime` | `string` <br>this needs to be specified only for note types 'code', 'file', 'image'. |
+| `content` <br>_required_ | `string` |
+| `notePosition` | `integer` <br>Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000 |
+| `prefix` | `string` <br>Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix. |
+| `isExpanded` | `boolean` <br>true if this note (as a folder) should appear expanded |
+| `noteId` | `EntityId` <br>DON'T specify unless you want to force a specific noteId |
+| `branchId` | `EntityId` <br>DON'T specify unless you want to force a specific branchId |
+| `dateCreated` | `LocalDateTime` <br>Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset). |
+| `utcDateCreated` | `UtcDateTime` <br>UTC timestap of the note creation. Specify only if you want to override the default (current datetime). |
+| `utcDateModified` | `UtcDateTime` <br>UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime). |
</div>
<div class="trilium-multicolumn-column">
@@ -81,10 +81,10 @@ Create a note and place it into the note tree
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `note` | `Note` | |
- | `branch` | `Branch` | Branch places the note into the tree, it represents the relationship between a parent note and child note |
+ | Property | Description |
+ | --- | --- |
+ | `note` | `Note` |
+ | `branch` | `Branch` <br>Branch places the note into the tree, it represents the relationship between a parent note and child note |
</div>
<div class="trilium-multicolumn-column">
@@ -149,11 +149,11 @@ Create a note and place it into the note tree
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -179,17 +179,17 @@ Search notes
**Query parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `search` <br>_required_ | `string` | search query string as described in [https://triliumnext.github.io/Docs/Wiki/search.html](https://triliumnext.github.io/Docs/Wiki/search.html) |
-| `fastSearch` | `boolean` | enable fast search (fulltext doesn't look into content) |
-| `includeArchivedNotes` | `boolean` | search by default ignores archived notes. Set to 'true' to includes archived notes into search results. |
-| `ancestorNoteId` | `EntityId` | search only in a subtree identified by the subtree noteId. By default whole tree is searched. |
-| `ancestorDepth` | `string` | define how deep in the tree should the notes be searched |
-| `orderBy` | `string` | name of the property/label to order search results by |
-| `orderDirection` | `string` | order direction, ascending or descending. One of `asc`, `desc`. |
-| `limit` | `integer` | limit the number of results you want to receive |
-| `debug` | `boolean` | set to true to get debug information in the response (search query parsing) |
+| Name | Description |
+| --- | --- |
+| `search` <br>_required_ | `string` <br>search query string as described in [https://triliumnext.github.io/Docs/Wiki/search.html](https://triliumnext.github.io/Docs/Wiki/search.html) |
+| `fastSearch` | `boolean` <br>enable fast search (fulltext doesn't look into content) |
+| `includeArchivedNotes` | `boolean` <br>search by default ignores archived notes. Set to 'true' to includes archived notes into search results. |
+| `ancestorNoteId` | `EntityId` <br>search only in a subtree identified by the subtree noteId. By default whole tree is searched. |
+| `ancestorDepth` | `string` <br>define how deep in the tree should the notes be searched |
+| `orderBy` | `string` <br>name of the property/label to order search results by |
+| `orderDirection` | `string` <br>order direction, ascending or descending. One of `asc`, `desc`. |
+| `limit` | `integer` <br>limit the number of results you want to receive |
+| `debug` | `boolean` <br>set to true to get debug information in the response (search query parsing) |
**Responses**
@@ -200,10 +200,10 @@ Search notes
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `results` <br>_required_ | `array of Note` | |
- | `debugInfo` | `object` | debugging info on parsing the search query enabled with &debug=true parameter |
+ | Property | Description |
+ | --- | --- |
+ | `results` <br>_required_ | `array of Note` |
+ | `debugInfo` | `object` <br>debugging info on parsing the search query enabled with &debug=true parameter |
</div>
<div class="trilium-multicolumn-column">
@@ -262,11 +262,11 @@ Search notes
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -292,9 +292,9 @@ Returns a note identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -305,23 +305,23 @@ Returns a note identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -375,11 +375,11 @@ Returns a note identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -405,9 +405,9 @@ deletes a single note based on the noteId supplied
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -422,11 +422,11 @@ deletes a single note based on the noteId supplied
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -452,9 +452,9 @@ patch a note identified by the noteId with changes in the body
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Request body** (required)
@@ -463,23 +463,23 @@ patch a note identified by the noteId with changes in the body
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `noteId` | `EntityId` | |
-| `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
-| `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
-| `mime` | `string` | |
-| `isProtected` | `boolean` | |
-| `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
-| `attributes` | `AttributeList` | |
-| `parentNoteIds` | `EntityIdList` | |
-| `childNoteIds` | `EntityIdList` | |
-| `parentBranchIds` | `EntityIdList` | |
-| `childBranchIds` | `EntityIdList` | |
-| `dateCreated` | `LocalDateTime` | |
-| `dateModified` | `LocalDateTime` | |
-| `utcDateCreated` | `UtcDateTime` | |
-| `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+| Property | Description |
+| --- | --- |
+| `noteId` | `EntityId` |
+| `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+| `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+| `mime` | `string` |
+| `isProtected` | `boolean` |
+| `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+| `attributes` | `AttributeList` |
+| `parentNoteIds` | `EntityIdList` |
+| `childNoteIds` | `EntityIdList` |
+| `parentBranchIds` | `EntityIdList` |
+| `childBranchIds` | `EntityIdList` |
+| `dateCreated` | `LocalDateTime` |
+| `dateModified` | `LocalDateTime` |
+| `utcDateCreated` | `UtcDateTime` |
+| `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -508,23 +508,23 @@ patch a note identified by the noteId with changes in the body
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -578,11 +578,11 @@ patch a note identified by the noteId with changes in the body
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -608,9 +608,9 @@ Returns note content identified by its ID. The response carries the note's MIME
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -628,9 +628,9 @@ Updates note content identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Request body** (required)
@@ -655,15 +655,15 @@ Exports ZIP file export of a given note subtree. To export whole document, use "
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Query parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `format` | `any` | One of `html`, `markdown`, `share`. |
+| Name | Description |
+| --- | --- |
+| `format` | `any` <br>One of `html`, `markdown`, `share`. |
**Responses**
@@ -678,11 +678,11 @@ Exports ZIP file export of a given note subtree. To export whole document, use "
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -708,9 +708,9 @@ Imports ZIP file into a given note.
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -721,10 +721,10 @@ Imports ZIP file into a given note.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `note` | `Note` | |
- | `branch` | `Branch` | Branch places the note into the tree, it represents the relationship between a parent note and child note |
+ | Property | Description |
+ | --- | --- |
+ | `note` | `Note` |
+ | `branch` | `Branch` <br>Branch places the note into the tree, it represents the relationship between a parent note and child note |
</div>
<div class="trilium-multicolumn-column">
@@ -789,11 +789,11 @@ Imports ZIP file into a given note.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -819,9 +819,9 @@ Restore a deleted note. The note must be deleted and must have at least one unde
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -832,9 +832,9 @@ Restore a deleted note. The note must be deleted and must have at least one unde
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `success` | `boolean` | |
+ | Property | Description |
+ | --- | --- |
+ | `success` | `boolean` |
</div>
<div class="trilium-multicolumn-column">
@@ -855,11 +855,11 @@ Restore a deleted note. The note must be deleted and must have at least one unde
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -885,9 +885,9 @@ Returns recent changes including note creations, modifications, and deletions
**Query parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `ancestorNoteId` | `EntityId` | Limit changes to a subtree identified by this note ID. Defaults to "root" (all notes). |
+| Name | Description |
+| --- | --- |
+| `ancestorNoteId` | `EntityId` <br>Limit changes to a subtree identified by this note ID. Defaults to "root" (all notes). |
**Responses**
@@ -918,11 +918,11 @@ Returns recent changes including note creations, modifications, and deletions
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -957,15 +957,15 @@ Create a branch (clone a note to a different location in the tree). In case ther
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `branchId` | `EntityId` | |
-| `noteId` | `EntityId` | identifies the child note |
-| `parentNoteId` | `EntityId` | identifies the parent note |
-| `prefix` | `string` | |
-| `notePosition` | `integer (int32)` | |
-| `isExpanded` | `boolean` | |
-| `utcDateModified` | `UtcDateTime` | |
+| Property | Description |
+| --- | --- |
+| `branchId` | `EntityId` |
+| `noteId` | `EntityId` <br>identifies the child note |
+| `parentNoteId` | `EntityId` <br>identifies the parent note |
+| `prefix` | `string` |
+| `notePosition` | `integer (int32)` |
+| `isExpanded` | `boolean` |
+| `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -991,15 +991,15 @@ Create a branch (clone a note to a different location in the tree). In case ther
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `branchId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `parentNoteId` | `EntityId` | identifies the parent note |
- | `prefix` | `string` | |
- | `notePosition` | `integer (int32)` | |
- | `isExpanded` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `branchId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `parentNoteId` | `EntityId` <br>identifies the parent note |
+ | `prefix` | `string` |
+ | `notePosition` | `integer (int32)` |
+ | `isExpanded` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1026,15 +1026,15 @@ Create a branch (clone a note to a different location in the tree). In case ther
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `branchId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `parentNoteId` | `EntityId` | identifies the parent note |
- | `prefix` | `string` | |
- | `notePosition` | `integer (int32)` | |
- | `isExpanded` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `branchId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `parentNoteId` | `EntityId` <br>identifies the parent note |
+ | `prefix` | `string` |
+ | `notePosition` | `integer (int32)` |
+ | `isExpanded` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1061,11 +1061,11 @@ Create a branch (clone a note to a different location in the tree). In case ther
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1091,9 +1091,9 @@ Returns a branch identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `branchId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `branchId` <br>_required_ | `EntityId` |
**Responses**
@@ -1104,15 +1104,15 @@ Returns a branch identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `branchId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `parentNoteId` | `EntityId` | identifies the parent note |
- | `prefix` | `string` | |
- | `notePosition` | `integer (int32)` | |
- | `isExpanded` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `branchId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `parentNoteId` | `EntityId` <br>identifies the parent note |
+ | `prefix` | `string` |
+ | `notePosition` | `integer (int32)` |
+ | `isExpanded` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1139,11 +1139,11 @@ Returns a branch identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1169,9 +1169,9 @@ deletes a branch based on the branchId supplied. If this is the last branch of t
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `branchId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `branchId` <br>_required_ | `EntityId` |
**Responses**
@@ -1186,11 +1186,11 @@ deletes a branch based on the branchId supplied. If this is the last branch of t
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1216,9 +1216,9 @@ patch a branch identified by the branchId with changes in the body. Only prefix
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `branchId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `branchId` <br>_required_ | `EntityId` |
**Request body** (required)
@@ -1227,15 +1227,15 @@ patch a branch identified by the branchId with changes in the body. Only prefix
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `branchId` | `EntityId` | |
-| `noteId` | `EntityId` | identifies the child note |
-| `parentNoteId` | `EntityId` | identifies the parent note |
-| `prefix` | `string` | |
-| `notePosition` | `integer (int32)` | |
-| `isExpanded` | `boolean` | |
-| `utcDateModified` | `UtcDateTime` | |
+| Property | Description |
+| --- | --- |
+| `branchId` | `EntityId` |
+| `noteId` | `EntityId` <br>identifies the child note |
+| `parentNoteId` | `EntityId` <br>identifies the parent note |
+| `prefix` | `string` |
+| `notePosition` | `integer (int32)` |
+| `isExpanded` | `boolean` |
+| `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1261,15 +1261,15 @@ patch a branch identified by the branchId with changes in the body. Only prefix
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `branchId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `parentNoteId` | `EntityId` | identifies the parent note |
- | `prefix` | `string` | |
- | `notePosition` | `integer (int32)` | |
- | `isExpanded` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `branchId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `parentNoteId` | `EntityId` <br>identifies the parent note |
+ | `prefix` | `string` |
+ | `notePosition` | `integer (int32)` |
+ | `isExpanded` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1296,11 +1296,11 @@ patch a branch identified by the branchId with changes in the body. Only prefix
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1326,9 +1326,9 @@ notePositions in branches are not automatically pushed to connected clients and
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `parentNoteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `parentNoteId` <br>_required_ | `EntityId` |
**Responses**
@@ -1343,11 +1343,11 @@ notePositions in branches are not automatically pushed to connected clients and
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1382,16 +1382,16 @@ create an attribute for a given note
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `attributeId` | `EntityId` | |
-| `noteId` | `EntityId` | identifies the child note |
-| `type` | `string` | One of `label`, `relation`. |
-| `name` | `string` | |
-| `value` | `string` | |
-| `position` | `integer (int32)` | |
-| `isInheritable` | `boolean` | |
-| `utcDateModified` | `UtcDateTime` | |
+| Property | Description |
+| --- | --- |
+| `attributeId` | `EntityId` |
+| `noteId` | `EntityId` <br>identifies the child note |
+| `type` | `string` <br>One of `label`, `relation`. |
+| `name` | `string` |
+| `value` | `string` |
+| `position` | `integer (int32)` |
+| `isInheritable` | `boolean` |
+| `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1419,16 +1419,16 @@ create an attribute for a given note
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `attributeId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `type` | `string` | One of `label`, `relation`. |
- | `name` | `string` | |
- | `value` | `string` | |
- | `position` | `integer (int32)` | |
- | `isInheritable` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `attributeId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `type` | `string` <br>One of `label`, `relation`. |
+ | `name` | `string` |
+ | `value` | `string` |
+ | `position` | `integer (int32)` |
+ | `isInheritable` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1456,11 +1456,11 @@ create an attribute for a given note
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1486,9 +1486,9 @@ Returns an attribute identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attributeId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attributeId` <br>_required_ | `EntityId` |
**Responses**
@@ -1499,16 +1499,16 @@ Returns an attribute identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `attributeId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `type` | `string` | One of `label`, `relation`. |
- | `name` | `string` | |
- | `value` | `string` | |
- | `position` | `integer (int32)` | |
- | `isInheritable` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `attributeId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `type` | `string` <br>One of `label`, `relation`. |
+ | `name` | `string` |
+ | `value` | `string` |
+ | `position` | `integer (int32)` |
+ | `isInheritable` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1536,11 +1536,11 @@ Returns an attribute identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1566,9 +1566,9 @@ deletes an attribute based on the attributeId supplied.
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attributeId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attributeId` <br>_required_ | `EntityId` |
**Responses**
@@ -1583,11 +1583,11 @@ deletes an attribute based on the attributeId supplied.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1613,9 +1613,9 @@ patch an attribute identified by the attributeId with changes in the body. For l
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attributeId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attributeId` <br>_required_ | `EntityId` |
**Request body** (required)
@@ -1624,16 +1624,16 @@ patch an attribute identified by the attributeId with changes in the body. For l
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `attributeId` | `EntityId` | |
-| `noteId` | `EntityId` | identifies the child note |
-| `type` | `string` | One of `label`, `relation`. |
-| `name` | `string` | |
-| `value` | `string` | |
-| `position` | `integer (int32)` | |
-| `isInheritable` | `boolean` | |
-| `utcDateModified` | `UtcDateTime` | |
+| Property | Description |
+| --- | --- |
+| `attributeId` | `EntityId` |
+| `noteId` | `EntityId` <br>identifies the child note |
+| `type` | `string` <br>One of `label`, `relation`. |
+| `name` | `string` |
+| `value` | `string` |
+| `position` | `integer (int32)` |
+| `isInheritable` | `boolean` |
+| `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1661,16 +1661,16 @@ patch an attribute identified by the attributeId with changes in the body. For l
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `attributeId` | `EntityId` | |
- | `noteId` | `EntityId` | identifies the child note |
- | `type` | `string` | One of `label`, `relation`. |
- | `name` | `string` | |
- | `value` | `string` | |
- | `position` | `integer (int32)` | |
- | `isInheritable` | `boolean` | |
- | `utcDateModified` | `UtcDateTime` | |
+ | Property | Description |
+ | --- | --- |
+ | `attributeId` | `EntityId` |
+ | `noteId` | `EntityId` <br>identifies the child note |
+ | `type` | `string` <br>One of `label`, `relation`. |
+ | `name` | `string` |
+ | `value` | `string` |
+ | `position` | `integer (int32)` |
+ | `isInheritable` | `boolean` |
+ | `utcDateModified` | `UtcDateTime` |
</div>
<div class="trilium-multicolumn-column">
@@ -1698,11 +1698,11 @@ patch an attribute identified by the attributeId with changes in the body. For l
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1732,9 +1732,9 @@ Returns all attachments for a note identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -1767,11 +1767,11 @@ Returns all attachments for a note identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1802,14 +1802,14 @@ create an attachment
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
-| `role` | `string` | |
-| `mime` | `string` | |
-| `title` | `string` | |
-| `content` | `string` | Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with `PUT /attachments/{attachmentId}/content`. |
-| `position` | `integer (int32)` | |
+| Property | Description |
+| --- | --- |
+| `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+| `role` | `string` |
+| `mime` | `string` |
+| `title` | `string` |
+| `content` | `string` <br>Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with `PUT /attachments/{attachmentId}/content`. |
+| `position` | `integer (int32)` |
</div>
<div class="trilium-multicolumn-column">
@@ -1837,19 +1837,19 @@ create an attachment
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `attachmentId` | `EntityId` | |
- | `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
- | `role` | `string` | |
- | `mime` | `string` | |
- | `title` | `string` | Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
- | `position` | `integer (int32)` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateModified` | `UtcDateTime` | |
- | `utcDateScheduledForErasureSince` | `UtcDateTime` | |
- | `contentLength` | `integer (int32)` | |
+ | Property | Description |
+ | --- | --- |
+ | `attachmentId` | `EntityId` |
+ | `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+ | `role` | `string` |
+ | `mime` | `string` |
+ | `title` | `string` <br>Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
+ | `position` | `integer (int32)` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateModified` | `UtcDateTime` |
+ | `utcDateScheduledForErasureSince` | `UtcDateTime` |
+ | `contentLength` | `integer (int32)` |
</div>
<div class="trilium-multicolumn-column">
@@ -1880,11 +1880,11 @@ create an attachment
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1910,9 +1910,9 @@ Returns an attachment identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attachmentId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attachmentId` <br>_required_ | `EntityId` |
**Responses**
@@ -1923,19 +1923,19 @@ Returns an attachment identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `attachmentId` | `EntityId` | |
- | `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
- | `role` | `string` | |
- | `mime` | `string` | |
- | `title` | `string` | Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
- | `position` | `integer (int32)` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateModified` | `UtcDateTime` | |
- | `utcDateScheduledForErasureSince` | `UtcDateTime` | |
- | `contentLength` | `integer (int32)` | |
+ | Property | Description |
+ | --- | --- |
+ | `attachmentId` | `EntityId` |
+ | `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+ | `role` | `string` |
+ | `mime` | `string` |
+ | `title` | `string` <br>Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
+ | `position` | `integer (int32)` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateModified` | `UtcDateTime` |
+ | `utcDateScheduledForErasureSince` | `UtcDateTime` |
+ | `contentLength` | `integer (int32)` |
</div>
<div class="trilium-multicolumn-column">
@@ -1966,11 +1966,11 @@ Returns an attachment identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -1996,9 +1996,9 @@ deletes an attachment based on the attachmentId supplied.
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attachmentId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attachmentId` <br>_required_ | `EntityId` |
**Responses**
@@ -2013,11 +2013,11 @@ deletes an attachment based on the attachmentId supplied.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2043,9 +2043,9 @@ patch an attachment identified by the attachmentId with changes in the body. Onl
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attachmentId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attachmentId` <br>_required_ | `EntityId` |
**Request body** (required)
@@ -2054,19 +2054,19 @@ patch an attachment identified by the attachmentId with changes in the body. Onl
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `attachmentId` | `EntityId` | |
-| `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
-| `role` | `string` | |
-| `mime` | `string` | |
-| `title` | `string` | Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
-| `position` | `integer (int32)` | |
-| `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
-| `dateModified` | `LocalDateTime` | |
-| `utcDateModified` | `UtcDateTime` | |
-| `utcDateScheduledForErasureSince` | `UtcDateTime` | |
-| `contentLength` | `integer (int32)` | |
+| Property | Description |
+| --- | --- |
+| `attachmentId` | `EntityId` |
+| `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+| `role` | `string` |
+| `mime` | `string` |
+| `title` | `string` <br>Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
+| `position` | `integer (int32)` |
+| `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+| `dateModified` | `LocalDateTime` |
+| `utcDateModified` | `UtcDateTime` |
+| `utcDateScheduledForErasureSince` | `UtcDateTime` |
+| `contentLength` | `integer (int32)` |
</div>
<div class="trilium-multicolumn-column">
@@ -2095,19 +2095,19 @@ patch an attachment identified by the attachmentId with changes in the body. Onl
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `attachmentId` | `EntityId` | |
- | `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
- | `role` | `string` | |
- | `mime` | `string` | |
- | `title` | `string` | Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
- | `position` | `integer (int32)` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateModified` | `UtcDateTime` | |
- | `utcDateScheduledForErasureSince` | `UtcDateTime` | |
- | `contentLength` | `integer (int32)` | |
+ | Property | Description |
+ | --- | --- |
+ | `attachmentId` | `EntityId` |
+ | `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+ | `role` | `string` |
+ | `mime` | `string` |
+ | `title` | `string` <br>Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
+ | `position` | `integer (int32)` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateModified` | `UtcDateTime` |
+ | `utcDateScheduledForErasureSince` | `UtcDateTime` |
+ | `contentLength` | `integer (int32)` |
</div>
<div class="trilium-multicolumn-column">
@@ -2138,11 +2138,11 @@ patch an attachment identified by the attachmentId with changes in the body. Onl
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2168,9 +2168,9 @@ Returns attachment content identified by its ID. The response carries the attach
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attachmentId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attachmentId` <br>_required_ | `EntityId` |
**Responses**
@@ -2188,9 +2188,9 @@ Updates attachment content identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `attachmentId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `attachmentId` <br>_required_ | `EntityId` |
**Request body** (required)
@@ -2219,15 +2219,15 @@ Create a note revision for the given note
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Query parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `format` | `any` | One of `html`, `markdown`. |
+| Name | Description |
+| --- | --- |
+| `format` | `any` <br>One of `html`, `markdown`. |
**Responses**
@@ -2242,11 +2242,11 @@ Create a note revision for the given note
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2272,9 +2272,9 @@ Returns the revisions of a note identified by its ID. Protected revisions are om
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `noteId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `noteId` <br>_required_ | `EntityId` |
**Responses**
@@ -2309,11 +2309,11 @@ Returns the revisions of a note identified by its ID. Protected revisions are om
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2339,9 +2339,9 @@ Returns a revision identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `revisionId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `revisionId` <br>_required_ | `EntityId` |
**Responses**
@@ -2352,21 +2352,21 @@ Returns a revision identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `revisionId` | `EntityId` | |
- | `noteId` | `EntityId` | |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `title` | `string` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `dateLastEdited` | `LocalDateTime` | |
- | `dateCreated` | `LocalDateTime` | |
- | `utcDateLastEdited` | `UtcDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | |
- | `contentLength` | `integer (int32)` | |
+ | Property | Description |
+ | --- | --- |
+ | `revisionId` | `EntityId` |
+ | `noteId` | `EntityId` |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `title` | `string` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `dateLastEdited` | `LocalDateTime` |
+ | `dateCreated` | `LocalDateTime` |
+ | `utcDateLastEdited` | `UtcDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` |
+ | `contentLength` | `integer (int32)` |
</div>
<div class="trilium-multicolumn-column">
@@ -2399,11 +2399,11 @@ Returns a revision identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2429,9 +2429,9 @@ Returns revision content identified by its ID
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `revisionId` <br>_required_ | `EntityId` | |
+| Name | Description |
+| --- | --- |
+| `revisionId` <br>_required_ | `EntityId` |
**Responses**
@@ -2446,11 +2446,11 @@ Returns revision content identified by its ID
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2480,9 +2480,9 @@ returns an "inbox" note, into which note can be created. Date will be used depen
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `date` <br>_required_ | `string (date)` | |
+| Name | Description |
+| --- | --- |
+| `date` <br>_required_ | `string (date)` |
**Responses**
@@ -2493,23 +2493,23 @@ returns an "inbox" note, into which note can be created. Date will be used depen
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -2563,11 +2563,11 @@ returns an "inbox" note, into which note can be created. Date will be used depen
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2593,9 +2593,9 @@ returns a day note for a given date. Gets created if doesn't exist.
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `date` <br>_required_ | `string (date)` | |
+| Name | Description |
+| --- | --- |
+| `date` <br>_required_ | `string (date)` |
**Responses**
@@ -2606,23 +2606,23 @@ returns a day note for a given date. Gets created if doesn't exist.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -2676,11 +2676,11 @@ returns a day note for a given date. Gets created if doesn't exist.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2706,9 +2706,9 @@ Returns the day note for the first day of the week containing the given date, ho
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `date` <br>_required_ | `string (date)` | Any date within the week, in the format YYYY-MM-DD. |
+| Name | Description |
+| --- | --- |
+| `date` <br>_required_ | `string (date)` <br>Any date within the week, in the format YYYY-MM-DD. |
**Responses**
@@ -2719,23 +2719,23 @@ Returns the day note for the first day of the week containing the given date, ho
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -2789,11 +2789,11 @@ Returns the day note for the first day of the week containing the given date, ho
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2819,9 +2819,9 @@ Returns a week note for a given ISO week (format YYYY-Www, e.g., 2025-W01). The
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `week` <br>_required_ | `string` | The ISO 8601 week identifier (YYYY-Www). |
+| Name | Description |
+| --- | --- |
+| `week` <br>_required_ | `string` <br>The ISO 8601 week identifier (YYYY-Www). |
**Responses**
@@ -2832,23 +2832,23 @@ Returns a week note for a given ISO week (format YYYY-Www, e.g., 2025-W01). The
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -2902,11 +2902,11 @@ Returns a week note for a given ISO week (format YYYY-Www, e.g., 2025-W01). The
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -2932,9 +2932,9 @@ Returns a month note for a given month (format YYYY-MM, e.g., 2022-02). The note
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `month` <br>_required_ | `string` | |
+| Name | Description |
+| --- | --- |
+| `month` <br>_required_ | `string` |
**Responses**
@@ -2945,23 +2945,23 @@ Returns a month note for a given month (format YYYY-MM, e.g., 2022-02). The note
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -3015,11 +3015,11 @@ Returns a month note for a given month (format YYYY-MM, e.g., 2022-02). The note
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3045,9 +3045,9 @@ Returns a year note for a given year (format YYYY, e.g., 2022). The note is crea
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `year` <br>_required_ | `string` | |
+| Name | Description |
+| --- | --- |
+| `year` <br>_required_ | `string` |
**Responses**
@@ -3058,23 +3058,23 @@ Returns a year note for a given year (format YYYY, e.g., 2022). The note is crea
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `noteId` | `EntityId` | |
- | `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
- | `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
- | `mime` | `string` | |
- | `isProtected` | `boolean` | |
- | `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
- | `attributes` | `AttributeList` | |
- | `parentNoteIds` | `EntityIdList` | |
- | `childNoteIds` | `EntityIdList` | |
- | `parentBranchIds` | `EntityIdList` | |
- | `childBranchIds` | `EntityIdList` | |
- | `dateCreated` | `LocalDateTime` | |
- | `dateModified` | `LocalDateTime` | |
- | `utcDateCreated` | `UtcDateTime` | |
- | `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+ | Property | Description |
+ | --- | --- |
+ | `noteId` | `EntityId` |
+ | `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+ | `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+ | `mime` | `string` |
+ | `isProtected` | `boolean` |
+ | `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+ | `attributes` | `AttributeList` |
+ | `parentNoteIds` | `EntityIdList` |
+ | `childNoteIds` | `EntityIdList` |
+ | `parentBranchIds` | `EntityIdList` |
+ | `childBranchIds` | `EntityIdList` |
+ | `dateCreated` | `LocalDateTime` |
+ | `dateModified` | `LocalDateTime` |
+ | `utcDateCreated` | `UtcDateTime` |
+ | `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
</div>
<div class="trilium-multicolumn-column">
@@ -3128,11 +3128,11 @@ Returns a year note for a given year (format YYYY, e.g., 2022). The note is crea
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3167,9 +3167,9 @@ get an ETAPI token based on password for further use with ETAPI. Too many reques
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
-| Property | Type | Description |
-| --- | --- | --- |
-| `password` | `string` | user's password used to e.g. login to Trilium server and/or protect notes |
+| Property | Description |
+| --- | --- |
+| `password` | `string` <br>user's password used to e.g. login to Trilium server and/or protect notes |
</div>
<div class="trilium-multicolumn-column">
@@ -3192,9 +3192,9 @@ get an ETAPI token based on password for further use with ETAPI. Too many reques
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `authToken` | `string` | |
+ | Property | Description |
+ | --- | --- |
+ | `authToken` | `string` |
</div>
<div class="trilium-multicolumn-column">
@@ -3219,11 +3219,11 @@ get an ETAPI token based on password for further use with ETAPI. Too many reques
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3260,11 +3260,11 @@ logout (delete/deactivate) an ETAPI token
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3301,16 +3301,16 @@ returns information about the running Trilium instance
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `appVersion` | `string` | Trilium version |
- | `dbVersion` | `integer (int32)` | DB version |
- | `syncVersion` | `integer (int32)` | Sync protocol version |
- | `buildDate` | `string (date-time)` | build date |
- | `buildRevision` | `string` | git build revision |
- | `dataDirectory` | `string` | data directory where Trilium stores files |
- | `clipperProtocolVersion` | `string` | version of the supported Trilium Web Clipper protocol |
- | `utcDateTime` | `string` | current UTC date time |
+ | Property | Description |
+ | --- | --- |
+ | `appVersion` | `string` <br>Trilium version |
+ | `dbVersion` | `integer (int32)` <br>DB version |
+ | `syncVersion` | `integer (int32)` <br>Sync protocol version |
+ | `buildDate` | `string (date-time)` <br>build date |
+ | `buildRevision` | `string` <br>git build revision |
+ | `dataDirectory` | `string` <br>data directory where Trilium stores files |
+ | `clipperProtocolVersion` | `string` <br>version of the supported Trilium Web Clipper protocol |
+ | `utcDateTime` | `string` <br>current UTC date time |
</div>
<div class="trilium-multicolumn-column">
@@ -3338,11 +3338,11 @@ returns information about the running Trilium instance
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3368,9 +3368,9 @@ Create a database backup under a given name
**Path parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `backupName` <br>_required_ | `StringId` | If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file |
+| Name | Description |
+| --- | --- |
+| `backupName` <br>_required_ | `StringId` <br>If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file |
**Responses**
@@ -3385,11 +3385,11 @@ Create a database backup under a given name
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3417,9 +3417,9 @@ The same data is served by GET /api/metrics to the web session.
**Query parameters**
-| Name | Type | Description |
-| --- | --- | --- |
-| `format` | `string` | Response format. Defaults to Prometheus text. One of `prometheus`, `json`. |
+| Name | Description |
+| --- | --- |
+| `format` | `string` <br>Response format. Defaults to Prometheus text. One of `prometheus`, `json`. |
**Responses**
@@ -3442,14 +3442,14 @@ The same data is served by GET /api/metrics to the web session.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `version` | `object` | |
- | `database` | `object` | |
- | `noteTypes` | `object` | Number of active notes per note type |
- | `attachmentTypes` | `object` | Number of active attachments per MIME type |
- | `statistics` | `object` | |
- | `timestamp` | `string` | |
+ | Property | Description |
+ | --- | --- |
+ | `version` | `object` |
+ | `database` | `object` |
+ | `noteTypes` | `object` <br>Number of active notes per note type |
+ | `attachmentTypes` | `object` <br>Number of active attachments per MIME type |
+ | `statistics` | `object` |
+ | `timestamp` | `string` |
</div>
<div class="trilium-multicolumn-column">
@@ -3507,11 +3507,11 @@ The same data is served by GET /api/metrics to the web session.
<div class="trilium-multicolumn-layout" data-trilium-column-ratios="1-1">
<div class="trilium-multicolumn-column">
- | Property | Type | Description |
- | --- | --- | --- |
- | `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
- | `code` <br>_required_ | `string` | stable string constant |
- | `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+ | Property | Description |
+ | --- | --- |
+ | `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+ | `code` <br>_required_ | `string` <br>stable string constant |
+ | `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
</div>
<div class="trilium-multicolumn-column">
@@ -3531,106 +3531,106 @@ The same data is served by GET /api/metrics to the web session.
### `CreateNoteDef`
-| Property | Type | Description |
-| --- | --- | --- |
-| `parentNoteId` <br>_required_ | `EntityId` | Note ID of the parent note in the tree |
-| `title` <br>_required_ | `string` | |
-| `type` <br>_required_ | `string` | One of `text`, `code`, `file`, `image`, `search`, `book`, `relationMap`, `render`. |
-| `mime` | `string` | this needs to be specified only for note types 'code', 'file', 'image'. |
-| `content` <br>_required_ | `string` | |
-| `notePosition` | `integer` | Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000 |
-| `prefix` | `string` | Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix. |
-| `isExpanded` | `boolean` | true if this note (as a folder) should appear expanded |
-| `noteId` | `EntityId` | DON'T specify unless you want to force a specific noteId |
-| `branchId` | `EntityId` | DON'T specify unless you want to force a specific branchId |
-| `dateCreated` | `LocalDateTime` | Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset). |
-| `utcDateCreated` | `UtcDateTime` | UTC timestap of the note creation. Specify only if you want to override the default (current datetime). |
-| `utcDateModified` | `UtcDateTime` | UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime). |
+| Property | Description |
+| --- | --- |
+| `parentNoteId` <br>_required_ | `EntityId` <br>Note ID of the parent note in the tree |
+| `title` <br>_required_ | `string` |
+| `type` <br>_required_ | `string` <br>One of `text`, `code`, `file`, `image`, `search`, `book`, `relationMap`, `render`. |
+| `mime` | `string` <br>this needs to be specified only for note types 'code', 'file', 'image'. |
+| `content` <br>_required_ | `string` |
+| `notePosition` | `integer` <br>Position of the note in the parent. Normal ordering is 10, 20, 30 ... So if you want to create a note on the first position, use e.g. 5, for second position 15, for last e.g. 1000000 |
+| `prefix` | `string` <br>Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix. |
+| `isExpanded` | `boolean` <br>true if this note (as a folder) should appear expanded |
+| `noteId` | `EntityId` <br>DON'T specify unless you want to force a specific noteId |
+| `branchId` | `EntityId` <br>DON'T specify unless you want to force a specific branchId |
+| `dateCreated` | `LocalDateTime` <br>Local timestap of the note creation. Specify only if you want to override the default (current datetime in the current timezone/offset). |
+| `utcDateCreated` | `UtcDateTime` <br>UTC timestap of the note creation. Specify only if you want to override the default (current datetime). |
+| `utcDateModified` | `UtcDateTime` <br>UTC timestamp of the note's last modification, e.g. to keep the date of a note being migrated from another application. The local dateModified is derived from it. Specify only if you want to override the default (current datetime). |
### `Note`
-| Property | Type | Description |
-| --- | --- | --- |
-| `noteId` | `EntityId` | |
-| `title` | `string` | Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
-| `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
-| `mime` | `string` | |
-| `isProtected` | `boolean` | |
-| `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
-| `attributes` | `AttributeList` | |
-| `parentNoteIds` | `EntityIdList` | |
-| `childNoteIds` | `EntityIdList` | |
-| `parentBranchIds` | `EntityIdList` | |
-| `childBranchIds` | `EntityIdList` | |
-| `dateCreated` | `LocalDateTime` | |
-| `dateModified` | `LocalDateTime` | |
-| `utcDateCreated` | `UtcDateTime` | |
-| `utcDateModified` | `UtcDateTime` | Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
+| Property | Description |
+| --- | --- |
+| `noteId` | `EntityId` |
+| `title` | `string` <br>Title of the note. Returned as "\[protected\]" for protected notes, since ETAPI cannot open a protected session. |
+| `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+| `mime` | `string` |
+| `isProtected` | `boolean` |
+| `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+| `attributes` | `AttributeList` |
+| `parentNoteIds` | `EntityIdList` |
+| `childNoteIds` | `EntityIdList` |
+| `parentBranchIds` | `EntityIdList` |
+| `childBranchIds` | `EntityIdList` |
+| `dateCreated` | `LocalDateTime` |
+| `dateModified` | `LocalDateTime` |
+| `utcDateCreated` | `UtcDateTime` |
+| `utcDateModified` | `UtcDateTime` <br>Writable through PATCH, e.g. to restore a migrated note's date after its content was rewritten. The local dateModified is derived from it. |
### `Branch`
Branch places the note into the tree, it represents the relationship between a parent note and child note
-| Property | Type | Description |
-| --- | --- | --- |
-| `branchId` | `EntityId` | |
-| `noteId` | `EntityId` | identifies the child note |
-| `parentNoteId` | `EntityId` | identifies the parent note |
-| `prefix` | `string` | |
-| `notePosition` | `integer (int32)` | |
-| `isExpanded` | `boolean` | |
-| `utcDateModified` | `UtcDateTime` | |
+| Property | Description |
+| --- | --- |
+| `branchId` | `EntityId` |
+| `noteId` | `EntityId` <br>identifies the child note |
+| `parentNoteId` | `EntityId` <br>identifies the parent note |
+| `prefix` | `string` |
+| `notePosition` | `integer (int32)` |
+| `isExpanded` | `boolean` |
+| `utcDateModified` | `UtcDateTime` |
### `NoteWithBranch`
-| Property | Type | Description |
-| --- | --- | --- |
-| `note` | `Note` | |
-| `branch` | `Branch` | Branch places the note into the tree, it represents the relationship between a parent note and child note |
+| Property | Description |
+| --- | --- |
+| `note` | `Note` |
+| `branch` | `Branch` <br>Branch places the note into the tree, it represents the relationship between a parent note and child note |
### `Attachment`
Attachment is owned by a note, has title and content
-| Property | Type | Description |
-| --- | --- | --- |
-| `attachmentId` | `EntityId` | |
-| `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
-| `role` | `string` | |
-| `mime` | `string` | |
-| `title` | `string` | Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
-| `position` | `integer (int32)` | |
-| `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
-| `dateModified` | `LocalDateTime` | |
-| `utcDateModified` | `UtcDateTime` | |
-| `utcDateScheduledForErasureSince` | `UtcDateTime` | |
-| `contentLength` | `integer (int32)` | |
+| Property | Description |
+| --- | --- |
+| `attachmentId` | `EntityId` |
+| `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+| `role` | `string` |
+| `mime` | `string` |
+| `title` | `string` <br>Title of the attachment. Returned as "\[protected\]" for protected attachments, since ETAPI cannot open a protected session. |
+| `position` | `integer (int32)` |
+| `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+| `dateModified` | `LocalDateTime` |
+| `utcDateModified` | `UtcDateTime` |
+| `utcDateScheduledForErasureSince` | `UtcDateTime` |
+| `contentLength` | `integer (int32)` |
### `CreateAttachment`
-| Property | Type | Description |
-| --- | --- | --- |
-| `ownerId` | `EntityId` | identifies the owner of the attachment, is either noteId or revisionId |
-| `role` | `string` | |
-| `mime` | `string` | |
-| `title` | `string` | |
-| `content` | `string` | Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with `PUT /attachments/{attachmentId}/content`. |
-| `position` | `integer (int32)` | |
+| Property | Description |
+| --- | --- |
+| `ownerId` | `EntityId` <br>identifies the owner of the attachment, is either noteId or revisionId |
+| `role` | `string` |
+| `mime` | `string` |
+| `title` | `string` |
+| `content` | `string` <br>Text content of the attachment, stored as-is. To store binary content, create the attachment without it, then upload the data with `PUT /attachments/{attachmentId}/content`. |
+| `position` | `integer (int32)` |
### `Attribute`
Attribute (Label, Relation) is a key-value record attached to a note.
-| Property | Type | Description |
-| --- | --- | --- |
-| `attributeId` | `EntityId` | |
-| `noteId` | `EntityId` | identifies the child note |
-| `type` | `string` | One of `label`, `relation`. |
-| `name` | `string` | |
-| `value` | `string` | |
-| `position` | `integer (int32)` | |
-| `isInheritable` | `boolean` | |
-| `utcDateModified` | `UtcDateTime` | |
+| Property | Description |
+| --- | --- |
+| `attributeId` | `EntityId` |
+| `noteId` | `EntityId` <br>identifies the child note |
+| `type` | `string` <br>One of `label`, `relation`. |
+| `name` | `string` |
+| `value` | `string` |
+| `position` | `integer (int32)` |
+| `isInheritable` | `boolean` |
+| `utcDateModified` | `UtcDateTime` |
### `AttributeList`
@@ -3638,10 +3638,10 @@ Type: `array of Attribute`
### `SearchResponse`
-| Property | Type | Description |
-| --- | --- | --- |
-| `results` <br>_required_ | `array of Note` | |
-| `debugInfo` | `object` | debugging info on parsing the search query enabled with &debug=true parameter |
+| Property | Description |
+| --- | --- |
+| `results` <br>_required_ | `array of Note` |
+| `debugInfo` | `object` <br>debugging info on parsing the search query enabled with &debug=true parameter |
### `EntityId`
@@ -3665,70 +3665,70 @@ Type: `string`
### `AppInfo`
-| Property | Type | Description |
-| --- | --- | --- |
-| `appVersion` | `string` | Trilium version |
-| `dbVersion` | `integer (int32)` | DB version |
-| `syncVersion` | `integer (int32)` | Sync protocol version |
-| `buildDate` | `string (date-time)` | build date |
-| `buildRevision` | `string` | git build revision |
-| `dataDirectory` | `string` | data directory where Trilium stores files |
-| `clipperProtocolVersion` | `string` | version of the supported Trilium Web Clipper protocol |
-| `utcDateTime` | `string` | current UTC date time |
+| Property | Description |
+| --- | --- |
+| `appVersion` | `string` <br>Trilium version |
+| `dbVersion` | `integer (int32)` <br>DB version |
+| `syncVersion` | `integer (int32)` <br>Sync protocol version |
+| `buildDate` | `string (date-time)` <br>build date |
+| `buildRevision` | `string` <br>git build revision |
+| `dataDirectory` | `string` <br>data directory where Trilium stores files |
+| `clipperProtocolVersion` | `string` <br>version of the supported Trilium Web Clipper protocol |
+| `utcDateTime` | `string` <br>current UTC date time |
### `Error`
-| Property | Type | Description |
-| --- | --- | --- |
-| `status` <br>_required_ | `integer (int32)` | HTTP status, identical to the one given in HTTP response |
-| `code` <br>_required_ | `string` | stable string constant |
-| `message` <br>_required_ | `string` | Human readable error, potentially with more details, |
+| Property | Description |
+| --- | --- |
+| `status` <br>_required_ | `integer (int32)` <br>HTTP status, identical to the one given in HTTP response |
+| `code` <br>_required_ | `string` <br>stable string constant |
+| `message` <br>_required_ | `string` <br>Human readable error, potentially with more details, |
### `Revision`
Revision represents a snapshot of note's title and content at some point in the past.
-| Property | Type | Description |
-| --- | --- | --- |
-| `revisionId` | `EntityId` | |
-| `noteId` | `EntityId` | |
-| `type` | `string` | One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
-| `mime` | `string` | |
-| `isProtected` | `boolean` | |
-| `title` | `string` | |
-| `blobId` | `string` | ID of the blob object which effectively serves as a content hash |
-| `dateLastEdited` | `LocalDateTime` | |
-| `dateCreated` | `LocalDateTime` | |
-| `utcDateLastEdited` | `UtcDateTime` | |
-| `utcDateCreated` | `UtcDateTime` | |
-| `utcDateModified` | `UtcDateTime` | |
-| `contentLength` | `integer (int32)` | |
+| Property | Description |
+| --- | --- |
+| `revisionId` | `EntityId` |
+| `noteId` | `EntityId` |
+| `type` | `string` <br>One of `text`, `code`, `render`, `file`, `image`, `search`, `relationMap`, `book`, `noteMap`, `mermaid`, `webView`, `shortcut`, `doc`, `contentWidget`, `launcher`. |
+| `mime` | `string` |
+| `isProtected` | `boolean` |
+| `title` | `string` |
+| `blobId` | `string` <br>ID of the blob object which effectively serves as a content hash |
+| `dateLastEdited` | `LocalDateTime` |
+| `dateCreated` | `LocalDateTime` |
+| `utcDateLastEdited` | `UtcDateTime` |
+| `utcDateCreated` | `UtcDateTime` |
+| `utcDateModified` | `UtcDateTime` |
+| `contentLength` | `integer (int32)` |
### `RecentChange`
Represents a recent change event (creation, modification, or deletion).
-| Property | Type | Description |
-| --- | --- | --- |
-| `noteId` | `EntityId` | |
-| `title` | `string` | Title at the time of the change (may be "\[protected\]" for protected notes) |
-| `current_title` | `string` | Current title of the note (may be "\[protected\]" for protected notes) |
-| `current_isDeleted` | `boolean` | Whether the note is currently deleted |
-| `current_deleteId` | `string` | Delete ID if the note is deleted |
-| `current_isProtected` | `boolean` | Whether the note is protected |
-| `utcDate` | `UtcDateTime` | UTC timestamp of the change |
-| `date` | `LocalDateTime` | Local timestamp of the change |
-| `canBeUndeleted` | `boolean` | Whether the note can be undeleted (only present for deleted notes) |
+| Property | Description |
+| --- | --- |
+| `noteId` | `EntityId` |
+| `title` | `string` <br>Title at the time of the change (may be "\[protected\]" for protected notes) |
+| `current_title` | `string` <br>Current title of the note (may be "\[protected\]" for protected notes) |
+| `current_isDeleted` | `boolean` <br>Whether the note is currently deleted |
+| `current_deleteId` | `string` <br>Delete ID if the note is deleted |
+| `current_isProtected` | `boolean` <br>Whether the note is protected |
+| `utcDate` | `UtcDateTime` <br>UTC timestamp of the change |
+| `date` | `LocalDateTime` <br>Local timestamp of the change |
+| `canBeUndeleted` | `boolean` <br>Whether the note can be undeleted (only present for deleted notes) |
### `Metrics`
Instance and database metrics, as served by GET /etapi/metrics?format=json
-| Property | Type | Description |
-| --- | --- | --- |
-| `version` | `object` | |
-| `database` | `object` | |
-| `noteTypes` | `object` | Number of active notes per note type |
-| `attachmentTypes` | `object` | Number of active attachments per MIME type |
-| `statistics` | `object` | |
-| `timestamp` | `string` | |
\ No newline at end of file
+| Property | Description |
+| --- | --- |
+| `version` | `object` |
+| `database` | `object` |
+| `noteTypes` | `object` <br>Number of active notes per note type |
+| `attachmentTypes` | `object` <br>Number of active attachments per MIME type |
+| `statistics` | `object` |
+| `timestamp` | `string` |
\ No newline at end of file