@ -16,7 +16,7 @@ See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for q
### Migrating from Trilium?
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Just upgrade your Trilium instance to the latest version and [install TriliumNext/Notes as usual](#-installation)
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Simply [install TriliumNext/Notes](#-installation) as usual and it will use your existing database.
Versions up to and including [v0.90.4](https://github.com/TriliumNext/Notes/releases/tag/v0.90.4) are compatible with the latest zadam/trilium version of [v0.63.7](https://github.com/zadam/trilium/releases/tag/v0.63.7). Any later versions of TriliumNext have their sync versions incremented.
@ -66,17 +66,7 @@ To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have
* Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable.
* Access TriliumNext via the web interface of a server installation (see below)
* Currently only the latest versions of Chrome & Firefox are supported (and tested).
* (Coming Soon) TriliumNext will also be provided as a Flatpak
#### MacOS
Currently when running TriliumNext/Notes on MacOS, you may get the following error:
> Apple could not verify "TriliumNext Notes" is free of malware and may harm your Mac or compromise your privacy.
You will need to run the command on your shell to resolve the error (documented [here](https://github.com/TriliumNext/Notes/issues/329#issuecomment-2287164137)):
```bash
xattr -c "/path/to/Trilium Next.app"
```
* TriliumNext is also provided as a Flatpak, but not yet published on FlatHub.
@ -9,16 +9,26 @@ As an alternative to calling the API directly, there are client libraries to sim
* [trilium-py](https://github.com/Nriver/trilium-py), you can use Python to communicate with Trilium.
## Obtaining a token
All operations with the REST API have to be authenticated using a token. You can get this token either from Options -> ETAPI or programmatically using the `/auth/login` REST call (see the [spec](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml)).
## Authentication
All operations have to be authenticated using a token. You can get this token either from Options -> ETAPI or programmatically using the `/auth/login` REST call (see the [spec](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml)):
### Via the `Authorization` header
```
GET https://myserver.com/etapi/app-info
Authorization: ETAPITOKEN
```
Alternatively, since 0.56 you can also use basic auth format:
where `ETAPITOKEN` is the token obtained in the previous step.
For compatibility with various tools, it's also possible to specify the value of the `Authorization` header in the format `Bearer ETAPITOKEN` (since 0.93.0).
<li><ahref="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 -> ETAPI or programmatically
using the <code>/auth/login</code> REST call (see the <ahref="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">spec</a>).</p>
<h2>Authentication</h2>
<p>All operations have to be authenticated using a token. You can get this
token either from Options -> ETAPI or programmatically using the <code>/auth/login</code> REST
call (see the <ahref="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">spec</a>):</p><pre><codeclass="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
<h3>Via the <code>Authorization</code> header</h3><pre><codeclass="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: ETAPITOKEN</code></pre>
<p>Alternatively, since 0.56 you can also use basic auth format:</p><pre><codeclass="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
<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><codeclass="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: Basic BATOKEN</code></pre>
<ul>
<li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is
an API that gives them access to various features of the application.</p>
<p>There are two APIs:</p>
<ul>
<li>One for the front-end scripts: <aclass="reference-link"href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/GLks18SNjxmC/_help_Q2z6av6JZVWm">Frontend API</a>
<li>One for the front-end scripts: <aclass="reference-link"href="#root/_help_Q2z6av6JZVWm">Frontend API</a>
</li>
<li>One for the back-end scripts: <aclass="reference-link"href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/GLks18SNjxmC/_help_MEtfsqa5VwNi">Backend API</a>
<li>One for the back-end scripts: <aclass="reference-link"href="#root/_help_MEtfsqa5VwNi">Backend API</a>
</li>
</ul>
<p>In both cases, the API resides in a global variable, <code>api</code>,