Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
<divclass="class-description">Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
larger amounts of data and generally not accessible to the user.</div>
<divclass="class-description">Attachment represent data related/attached to the note. Conceptually similar to attributes, but intended for
larger amounts of data and generally not accessible to the user.</div>
</header>
</header>
@ -2220,7 +2221,9 @@
<divclass="description">
<divclass="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
<divclass="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
and relation (representing named relationship between source and target note)</div>
<divclass="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
and relation (representing named relationship between source and target note)</div>
</header>
</header>
@ -1735,7 +1736,9 @@
<divclass="description">
<divclass="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
<divclass="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
parents.
Note that you should not rely on the branch's identity, since it can change easily with a note's move.
Always check noteId instead.</div>
<divclass="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
parents.
Note that you should not rely on the branch's identity, since it can change easily with a note's move.
Always check noteId instead.</div>
</header>
</header>
@ -417,7 +421,11 @@
<divclass="description">
<divclass="description">
Branch is weak when its existence should not hinder deletion of its note.
As a result, note with only weak branches should be immediately deleted.
An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
of deletion should not act as a clone.
Branch is weak when its existence should not hinder deletion of its note.
As a result, note with only weak branches should be immediately deleted.
An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
of deletion should not act as a clone.
</div>
</div>
@ -1842,7 +1850,9 @@
<divclass="description">
<divclass="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
<divclass="class-description">EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
Used by:
- Trilium Sender
- ETAPI clients
The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
from tokenHash and token.</div>
<divclass="class-description">EtapiToken is an entity representing token used to authenticate against Trilium REST API from client applications.
Used by:
- Trilium Sender
- ETAPI clients
The format user is presented with is "<etapiTokenId>_<tokenHash>". This is also called "authToken" to distinguish it
from tokenHash and token.</div>
</header>
</header>
@ -1287,7 +1293,9 @@
<divclass="description">
<divclass="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Adds a new attribute to this note. The attribute is saved and returned.
See addLabel, addRelation for more specific methods.
Adds a new attribute to this note. The attribute is saved and returned.
See addLabel, addRelation for more specific methods.
</div>
</div>
@ -1896,7 +1897,8 @@
<divclass="description">
<divclass="description">
Adds a new relation to this note. The relation attribute is saved and
returned.
Adds a new relation to this note. The relation attribute is saved and
returned.
</div>
</div>
@ -2376,7 +2378,17 @@
<divclass="description">
<divclass="description">
Some notes are eligible for conversion into an attachment of its parent, note must have these properties:
- it has exactly one target relation
- it has a relation from its parent note
- it has no children
- it has no clones
- the parent is of type text
- both notes are either unprotected or user is in protected session
Currently, works only for image notes.
In the future, this functionality might get more generic and some of the requirements relaxed.
Some notes are eligible for conversion into an attachment of its parent, note must have these properties:
- it has exactly one target relation
- it has a relation from its parent note
- it has no children
- it has no clones
- the parent is of type text
- both notes are either unprotected or user is in protected session
Currently, works only for image notes.
In the future, this functionality might get more generic and some of the requirements relaxed.
</div>
</div>
@ -3627,7 +3639,8 @@
<divclass="param-desc">
<divclass="param-desc">
attribute of the given type and name. If there are more such attributes, first is returned.
Returns null if there's no such attribute belonging to this note.
attribute of the given type and name. If there are more such attributes, first is returned.
Returns null if there's no such attribute belonging to this note.
</div>
</div>
@ -3845,7 +3858,8 @@
<divclass="description">
<divclass="description">
Beware that the method must not create a copy of the array, but actually returns its internal array
(for performance reasons)
Beware that the method must not create a copy of the array, but actually returns its internal array
(for performance reasons)
</div>
</div>
@ -5008,7 +5022,9 @@
<divclass="description">
<divclass="description">
This is used for:
- fast searching
- note similarity evaluation
This is used for:
- fast searching
- note similarity evaluation
</div>
</div>
@ -5187,7 +5203,8 @@
<divclass="param-desc">
<divclass="param-desc">
- returns only notes which are templated, does not include their subtrees
in effect returns notes which are influenced by note's non-inheritable attributes
- returns only notes which are templated, does not include their subtrees
in effect returns notes which are influenced by note's non-inheritable attributes
</div>
</div>
@ -6045,7 +6062,9 @@
<divclass="param-desc">
<divclass="param-desc">
attribute belonging to this specific note (excludes inherited attributes)
This method can be significantly faster than the getAttribute()
attribute belonging to this specific note (excludes inherited attributes)
This method can be significantly faster than the getAttribute()
</div>
</div>
@ -6263,7 +6282,8 @@
<divclass="description">
<divclass="description">
Beware that the method must not create a copy of the array, but actually returns its internal array
(for performance reasons)
Beware that the method must not create a copy of the array, but actually returns its internal array
(for performance reasons)
</div>
</div>
@ -12101,7 +12121,9 @@
<divclass="description">
<divclass="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
<divclass="class-description">Revision represents a snapshot of note's title and content at some point in the past.
It's used for seamless note versioning.</div>
<divclass="class-description">Revision represents a snapshot of note's title and content at some point in the past.
It's used for seamless note versioning.</div>
</header>
</header>
@ -2076,7 +2077,9 @@
<divclass="description">
<divclass="description">
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
Mark the entity as (soft) deleted. It will be completely erased later.
This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.
<p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
available in the JS backend notes. You can use e.g. <code>api.log(api.startNote.title);</code></p>
<p>This is the main backend API interface for scripts. All the properties and methods are published in the "api" object
available in the JS backend notes. You can use e.g. <code>api.log(api.startNote.title);</code></p>
Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
JSON MIME type. See also createNewNote() for more options.
Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
JSON MIME type. See also createNewNote() for more options.
</div>
</div>
@ -2290,7 +2292,10 @@
</td>
</td>
<tdclass="description last">one of
* "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
* "script" - activating the launcher will execute the script (specified in scriptNoteId param)
* "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)</td>
<tdclass="description last">one of
* "note" - activating the launcher will navigate to the target note (specified in targetNoteId param)
* "script" - activating the launcher will execute the script (specified in scriptNoteId param)
* "customWidget" - the launcher will be rendered with a custom widget (specified in widgetNoteId param)</td>
</tr>
</tr>
@ -4213,7 +4218,8 @@
<divclass="description">
<divclass="description">
Instance name identifies particular Trilium instance. It can be useful for scripts
if some action needs to happen on only one specific instance.
Instance name identifies particular Trilium instance. It can be useful for scripts
if some action needs to happen on only one specific instance.
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See <ahref="https://github.com/zadam/trilium/wiki/Search">https://github.com/zadam/trilium/wiki/Search</a> for full documentation for all options
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See <ahref="https://github.com/zadam/trilium/wiki/Search">https://github.com/zadam/trilium/wiki/Search</a> for full documentation for all options
</div>
</div>
@ -6369,7 +6561,8 @@
<divclass="description">
<divclass="description">
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See <ahref="https://github.com/zadam/trilium/wiki/Search">https://github.com/zadam/trilium/wiki/Search</a> for full documentation for all options
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See <ahref="https://github.com/zadam/trilium/wiki/Search">https://github.com/zadam/trilium/wiki/Search</a> for full documentation for all options
</div>
</div>
@ -6567,7 +6760,10 @@
<divclass="description">
<divclass="description">
This method finds note by its noteId and prefix and either sets it to the given parentNoteId
or removes the branch (if parentNoteId is not given).
This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
This method finds note by its noteId and prefix and either sets it to the given parentNoteId
or removes the branch (if parentNoteId is not given).
This method looks similar to toggleNoteInParent() but differs because we're looking up branch by prefix.
</div>
</div>
@ -6930,7 +7126,8 @@
</td>
</td>
<tdclass="description last">'title', 'dateCreated', 'dateModified' or a label name
See <ahref="https://github.com/zadam/trilium/wiki/Sorting">https://github.com/zadam/trilium/wiki/Sorting</a> for details.</td>
<tdclass="description last">'title', 'dateCreated', 'dateModified' or a label name
See <ahref="https://github.com/zadam/trilium/wiki/Sorting">https://github.com/zadam/trilium/wiki/Sorting</a> for details.</td>
</tr>
</tr>
@ -7342,7 +7539,8 @@
<divclass="description">
<divclass="description">
This functions wraps code which is supposed to be running in transaction. If transaction already
exists, then we'll use that transaction.
This functions wraps code which is supposed to be running in transaction. If transaction already
There are many different Note types, some of which are entirely opaque to the
end user. Those types should be used only for checking against, they are
not for direct use.
There are many different Note types, some of which are entirely opaque to the
end user. Those types should be used only for checking against, they are
<divclass="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
and relation (representing named relationship between source and target note)</div>
<divclass="class-description">Attribute is an abstract concept which has two real uses - label (key - value pair)
and relation (representing named relationship between source and target note)</div>
<divclass="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
parents.</div>
<divclass="class-description">Branch represents a relationship between a child note and its parent note. Trilium allows a note to have multiple
<p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.startNote.title);</code></p>
<p>This is the main frontend API interface for scripts. All the properties and methods are published in the "api" object
available in the JS frontend notes. You can use e.g. <code>api.showMessage(api.startNote.title);</code></p>
day.js library for date manipulation.
See <ahref="https://day.js.org">https://day.js.org</a> for documentation
day.js library for date manipulation.
See <ahref="https://day.js.org">https://day.js.org</a> for documentation
</div>
</div>
@ -1273,7 +1275,8 @@
<tdclass="description last">id of the button, used to identify the old instances of this button to be replaced
ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.</td>
<tdclass="description last">id of the button, used to identify the old instances of this button to be replaced
ID is optional because of BC, but not specifying it is deprecated. ID can be alphanumeric only.</td>
</tr>
</tr>
@ -1375,7 +1378,8 @@
<dtclass="important tag-deprecated">Deprecated:</dt><dd><ulclass="dummy"><li>you can now create/modify launchers in the top-left Menu -> Configure Launchbar
for special needs there's also backend API's createOrUpdateLauncher()</li></ul></dd>
<dtclass="important tag-deprecated">Deprecated:</dt><dd><ulclass="dummy"><li>you can now create/modify launchers in the top-left Menu -> Configure Launchbar
for special needs there's also backend API's createOrUpdateLauncher()</li></ul></dd>
<tdclass="description last">specify namespace of the handler for the cases where call for bind may be repeated.
If a handler with this ID exists, it's replaced by the new handler.</td>
<tdclass="description last">specify namespace of the handler for the cases where call for bind may be repeated.
If a handler with this ID exists, it's replaced by the new handler.</td>
Get access to the widget handling note detail. Methods like `getWidgetType()` and `getTypeWidget()` to get to the
implementation of actual widget type.
Get access to the widget handling note detail. Methods like `getWidgetType()` and `getTypeWidget()` to get to the
Returns note by given noteId. If note is missing from the cache, it's loaded.
*
Returns note by given noteId. If note is missing from the cache, it's loaded.
*
</div>
</div>
@ -3890,7 +3957,10 @@
<divclass="description">
<divclass="description">
Returns list of notes. If note is missing from the cache, it's loaded.
This is often used to bulk-fill the cache with notes which would have to be picked one by one
otherwise (by e.g. createLink())
Returns list of notes. If note is missing from the cache, it's loaded.
This is often used to bulk-fill the cache with notes which would have to be picked one by one
Executes given anonymous function on the backend.
Internally this serializes the anonymous function into string and sends it to backend via AJAX.
Executes given anonymous function on the backend.
Internally this serializes the anonymous function into string and sends it to backend via AJAX.
</div>
</div>
@ -6144,7 +6215,8 @@
<divclass="description">
<divclass="description">
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
</div>
</div>
@ -6299,7 +6371,8 @@
<divclass="description">
<divclass="description">
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
This is a powerful search method - you can search by attributes and their values, e.g.:
"#dateModified =* MONTH AND #log". See full documentation for all options at: https://github.com/zadam/trilium/wiki/Search
Trilium runs in a backend and frontend process, when something is changed on the backend from a script,
frontend will get asynchronously synchronized.
This method returns a promise which resolves once all the backend -> frontend synchronization is finished.
Typical use case is when a new note has been created, we should wait until it is synced into frontend and only then activate it.
Trilium runs in a backend and frontend process, when something is changed on the backend from a script,
frontend will get asynchronously synchronized.
This method returns a promise which resolves once all the backend -> frontend synchronization is finished.
Typical use case is when a new note has been created, we should wait until it is synced into frontend and only then activate it.
There are many different Note types, some of which are entirely opaque to the
end user. Those types should be used only for checking against, they are
not for direct use.
There are many different Note types, some of which are entirely opaque to the
end user. Those types should be used only for checking against, they are