@ -3,7 +3,11 @@ ETAPI is Trilium's public/external REST API. It is available since Trilium v0.50
The documentation is in OpenAPI format, available [here](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml).
The documentation is in OpenAPI format, available [here](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml).
[trilium-py](https://github.com/Nriver/trilium-py) is a third-party Python implementation for ETAPI client, you can use Python to communicate with Trilium.
## API clients
As an alternative to calling the API directly, there are client libraries to simplify this
* [trilium-py](https://github.com/Nriver/trilium-py), you can use Python to communicate with Trilium.
## Authentication
## Authentication
@ -25,4 +29,26 @@ Authorization: Basic BATOKEN
* Where `username` is "etapi"
* Where `username` is "etapi"
* And `password` is the generated ETAPI token described above.
* And `password` is the generated ETAPI token described above.
Basic Auth is meant to be used with tools which support only basic auth.
Basic Auth is meant to be used with tools which support only basic auth.
## Interaction using Bash scripts
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>ETAPI is Trilium's public/external REST API. It is available since Trilium
<p>ETAPI is Trilium's public/external REST API. It is available since Trilium
v0.50.</p>
v0.50.</p>
<p>The documentation is in OpenAPI format, available <ahref="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">here</a>.</p>
<p>The documentation is in OpenAPI format, available <ahref="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">here</a>.</p>
<p><ahref="https://github.com/Nriver/trilium-py">trilium-py</a> is a third-party
<h2>API clients</h2>
Python implementation for ETAPI client, you can use Python to communicate
<p>As an alternative to calling the API directly, there are client libraries
with Trilium.</p>
to simplify this</p>
<ul>
<li><ahref="https://github.com/Nriver/trilium-py">trilium-py</a>, you can
use Python to communicate with Trilium.</li>
</ul>
<h2>Authentication</h2>
<h2>Authentication</h2>
<p>All operations have to be authenticated using a token. You can get this
<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
token either from Options -> ETAPI or programmatically using the <code>/auth/login</code> REST