Download OpenAPI specification:
External Trilium API
Create a note and place it into the note tree
| parentNoteId required | string (EntityId) [a-zA-Z0-9_]{4,32} |
| title required | string |
| type required | string Enum: "text" "code" "file" "image" "search" "book" "relationMap" "render" |
| mime | string this needs to be specified only for note types 'code', 'file', 'image'. |
| content 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 | string (EntityId) [a-zA-Z0-9_]{4,32} |
| branchId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| dateCreated | string (LocalDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| utcDateCreated | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
{- "parentNoteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "application/json",
- "content": "string",
- "notePosition": 0,
- "prefix": "string",
- "isExpanded": true,
- "noteId": "evnnmvHTCgIn",
- "branchId": "evnnmvHTCgIn",
- "dateCreated": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}{- "note": {
- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}, - "branch": {
- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
}Search notes
| search required | string Examples:
search query string as described in https://triliumnext.github.io/Docs/Wiki/search.html |
| fastSearch | boolean Default: false enable fast search (fulltext doesn't look into content) |
| includeArchivedNotes | boolean Default: false search by default ignores archived notes. Set to 'true' to includes archived notes into search results. |
| ancestorNoteId | string (EntityId) [a-zA-Z0-9_]{4,32} Example: ancestorNoteId=evnnmvHTCgIn search only in a subtree identified by the subtree noteId. By default whole tree is searched. |
| ancestorDepth | string Examples:
define how deep in the tree should the notes be searched |
| orderBy | string Example: orderBy=title&orderBy=#publicationDate&orderBy=isProtected&orderBy=isArchived&orderBy=dateCreated&orderBy=dateModified&orderBy=utcDateCreated&orderBy=utcDateModified&orderBy=parentCount&orderBy=childrenCount&orderBy=attributeCount&orderBy=labelCount&orderBy=ownedLabelCount&orderBy=relationCount&orderBy=ownedRelationCount&orderBy=relationCountIncludingLinks&orderBy=ownedRelationCountIncludingLinks&orderBy=targetRelationCount&orderBy=targetRelationCountIncludingLinks&orderBy=contentSize&orderBy=contentAndAttachmentsSize&orderBy=contentAndAttachmentsAndRevisionsSize&orderBy=revisionCount name of the property/label to order search results by |
| orderDirection | string Default: "asc" Enum: "asc" "desc" order direction, ascending or descending |
| limit | integer Example: limit=10 limit the number of results you want to receive |
| debug | boolean Default: false set to true to get debug information in the response (search query parsing) |
{- "results": [
- {
- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "debugInfo": { }
}Returns a note identified by its ID
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}patch a note identified by the noteId with changes in the body
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
| noteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| title | string Title of the note. Returned as "[protected]" for protected notes, since ETAPI cannot open a protected session. |
| type | string Enum: "text" "code" "render" "file" "image" "search" "relationMap" "book" "noteMap" "mermaid" "webView" "shortcut" "doc" "contentWidget" "launcher" |
| mime | string |
| blobId | string ID of the blob object which effectively serves as a content hash |
Array of objects (AttributeList) | |
| parentNoteIds | Array of strings (EntityIdList) [ items[a-zA-Z0-9_]{4,32} ] |
| childNoteIds | Array of strings (EntityIdList) [ items[a-zA-Z0-9_]{4,32} ] |
| parentBranchIds | Array of strings (EntityIdList) [ items[a-zA-Z0-9_]{4,32} ] |
| childBranchIds | Array of strings (EntityIdList) [ items[a-zA-Z0-9_]{4,32} ] |
| dateCreated | string (LocalDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| dateModified | string (LocalDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| utcDateCreated | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}deletes a single note based on the noteId supplied
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}Updates note content identified by its ID
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
New content of the note. Send text (such as the HTML of a text note) as text/plain and binary data (such as the file of an image or file note) as application/octet-stream; other content types are not accepted.
Exports ZIP file export of a given note subtree. To export whole document, use "root" for noteId
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
| format | any Default: "html" Enum: "html" "markdown" "share" |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}Imports ZIP file into a given note.
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "note": {
- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}, - "branch": {
- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
}Create a note revision for the given note
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
| format | any Default: "html" Enum: "html" "markdown" |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}Returns the revisions of a note identified by its ID. Protected revisions are omitted, since they cannot be read through ETAPI individually either.
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
[- {
- "revisionId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "title": "string",
- "blobId": "string",
- "dateLastEdited": "2021-12-31 20:18:11.930+0100",
- "dateCreated": "2021-12-31 20:18:11.930+0100",
- "utcDateLastEdited": "2021-12-31 19:18:11.930Z",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}
]Returns all attachments for a note identified by its ID
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
[- {
- "attachmentId": "evnnmvHTCgIn",
- "ownerId": "evnnmvHTCgIn",
- "role": "string",
- "mime": "string",
- "title": "string",
- "position": 0,
- "blobId": "string",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "utcDateScheduledForErasureSince": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}
]Restore a deleted note. The note must be deleted and must have at least one undeleted parent.
| noteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "success": true
}Returns recent changes including note creations, modifications, and deletions
| ancestorNoteId | string (EntityId) [a-zA-Z0-9_]{4,32} Example: ancestorNoteId=evnnmvHTCgIn Limit changes to a subtree identified by this note ID. Defaults to "root" (all notes). |
[- {
- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "current_title": "string",
- "current_isDeleted": true,
- "current_deleteId": "string",
- "current_isProtected": true,
- "utcDate": "2021-12-31 19:18:11.930Z",
- "date": "2021-12-31 20:18:11.930+0100",
- "canBeUndeleted": true
}
]Returns a revision identified by its ID
| revisionId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "revisionId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "title": "string",
- "blobId": "string",
- "dateLastEdited": "2021-12-31 20:18:11.930+0100",
- "dateCreated": "2021-12-31 20:18:11.930+0100",
- "utcDateLastEdited": "2021-12-31 19:18:11.930Z",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}Returns revision content identified by its ID
| revisionId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}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.
| branchId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| noteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| parentNoteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| prefix | string |
| notePosition | integer <int32> |
| isExpanded | boolean |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
{- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}{- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}Returns a branch identified by its ID
| branchId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}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.
| branchId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
| branchId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| noteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| parentNoteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| prefix | string |
| notePosition | integer <int32> |
| isExpanded | boolean |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
{- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}{- "branchId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "parentNoteId": "evnnmvHTCgIn",
- "prefix": "string",
- "notePosition": 0,
- "isExpanded": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}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.
| branchId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}create an attachment
| ownerId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| 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 |
| position | integer <int32> |
{- "ownerId": "evnnmvHTCgIn",
- "role": "string",
- "mime": "string",
- "title": "string",
- "content": "string",
- "position": 0
}{- "attachmentId": "evnnmvHTCgIn",
- "ownerId": "evnnmvHTCgIn",
- "role": "string",
- "mime": "string",
- "title": "string",
- "position": 0,
- "blobId": "string",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "utcDateScheduledForErasureSince": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}Returns an attachment identified by its ID
| attachmentId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "attachmentId": "evnnmvHTCgIn",
- "ownerId": "evnnmvHTCgIn",
- "role": "string",
- "mime": "string",
- "title": "string",
- "position": 0,
- "blobId": "string",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "utcDateScheduledForErasureSince": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}patch an attachment identified by the attachmentId with changes in the body. Only role, mime, title, and position are patchable.
| attachmentId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
| attachmentId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| ownerId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| 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 | string (LocalDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| utcDateScheduledForErasureSince | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
| contentLength | integer <int32> |
{- "attachmentId": "evnnmvHTCgIn",
- "ownerId": "evnnmvHTCgIn",
- "role": "string",
- "mime": "string",
- "title": "string",
- "position": 0,
- "blobId": "string",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "utcDateScheduledForErasureSince": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}{- "attachmentId": "evnnmvHTCgIn",
- "ownerId": "evnnmvHTCgIn",
- "role": "string",
- "mime": "string",
- "title": "string",
- "position": 0,
- "blobId": "string",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateModified": "2021-12-31 19:18:11.930Z",
- "utcDateScheduledForErasureSince": "2021-12-31 19:18:11.930Z",
- "contentLength": 0
}deletes an attachment based on the attachmentId supplied.
| attachmentId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}Updates attachment content identified by its ID
| attachmentId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
New content of the attachment. Send text as text/plain and binary data (such as an image or a PDF) as application/octet-stream; other content types are not accepted.
create an attribute for a given note
| attributeId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| noteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| type | string Enum: "label" "relation" |
| name | string^[^\s]+ |
| value | string |
| position | integer <int32> |
| isInheritable | boolean |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
{- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}{- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}Returns an attribute identified by its ID
| attributeId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}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.
| attributeId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
| attributeId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| noteId | string (EntityId) [a-zA-Z0-9_]{4,32} |
| type | string Enum: "label" "relation" |
| name | string^[^\s]+ |
| value | string |
| position | integer <int32> |
| isInheritable | boolean |
| utcDateModified | string (UtcDateTime) [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:... |
{- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}{- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}deletes an attribute based on the attributeId supplied.
| attributeId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}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.
| parentNoteId required | string (EntityId) [a-zA-Z0-9_]{4,32} Example: evnnmvHTCgIn |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}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.
| date required | string <date> Example: 2022-02-22 |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}returns a day note for a given date. Gets created if doesn't exist.
| date required | string <date> Example: 2022-02-22 |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}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.
| date required | string <date> Example: 2022-02-22 Any date within the week, in the format YYYY-MM-DD. |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}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.
| week required | string[0-9]{4}-W[0-9]{2} Example: 2025-W01 The ISO 8601 week identifier (YYYY-Www). |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}Returns a month note for a given month (format YYYY-MM, e.g., 2022-02). The note is created if it doesn't exist.
| month required | string[0-9]{4}-[0-9]{2} Example: 2022-02 |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}Returns a year note for a given year (format YYYY, e.g., 2022). The note is created if it doesn't exist.
| year required | string^[0-9]{4}$ Example: 2022 |
{- "noteId": "evnnmvHTCgIn",
- "title": "string",
- "type": "text",
- "mime": "string",
- "isProtected": true,
- "blobId": "string",
- "attributes": [
- {
- "attributeId": "evnnmvHTCgIn",
- "noteId": "evnnmvHTCgIn",
- "type": "label",
- "name": "shareCss",
- "value": "string",
- "position": 0,
- "isInheritable": true,
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}
], - "parentNoteIds": [
- "evnnmvHTCgIn"
], - "childNoteIds": [
- "evnnmvHTCgIn"
], - "parentBranchIds": [
- "evnnmvHTCgIn"
], - "childBranchIds": [
- "evnnmvHTCgIn"
], - "dateCreated": "2021-12-31 20:18:11.930+0100",
- "dateModified": "2021-12-31 20:18:11.930+0100",
- "utcDateCreated": "2021-12-31 19:18:11.930Z",
- "utcDateModified": "2021-12-31 19:18:11.930Z"
}get an ETAPI token based on password for further use with ETAPI
| password | string user's password used to e.g. login to Trilium server and/or protect notes |
{- "password": "string"
}{- "authToken": "Bc4bFn0Ffiok_4NpbVCDnFz7B2WU+pdhW8B5Ne3DiR5wXrEyqdjgRIsk="
}returns information about the running Trilium instance
{- "appVersion": "0.50.2",
- "dbVersion": 194,
- "syncVersion": 25,
- "buildDate": "2022-02-09T22:52:36+01:00",
- "buildRevision": "23daaa2387a0655685377f0a541d154aeec2aae8",
- "dataDirectory": "/home/user/data",
- "clipperProtocolVersion": 1,
- "utcDateTime": "2022-03-07T21:54:25.277Z"
}Create a database backup under a given name
| backupName required | string (StringId) [a-zA-Z0-9_]{1,32} Example: my_ID If the backupName is e.g. "now", then the backup will be written to "backup-now.db" file |
{- "status": 400,
- "code": "NOTE_IS_PROTECTED",
- "message": "Note 'evnnmvHTCgIn' is protected and cannot be modified through ETAPI"
}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.
The same data is served by GET /api/metrics to the web session.
| format | string Default: "prometheus" Enum: "prometheus" "json" Response format. Defaults to Prometheus text. |
# HELP trilium_info Trilium instance information # TYPE trilium_info gauge trilium_info{version="0.99.3",db_version="231"} 1 1701432000 # HELP trilium_notes_total Total number of notes including deleted # TYPE trilium_notes_total gauge trilium_notes_total 1234 1701432000