Skip to content

Use of ETAPI with curl #61

Open
Open
@maphew

Description

@maphew

EDIT: To resolve this issue, #61 (comment) should be integrated into the documentation.


Trilium Version

0.63.5

What operating system are you using?

Other (specify below)

What is your setup?

Server access only

Operating System Version

Windows 10.0.19045 Build 19045

Description

Using ETAPI call to export a note and it's children results in {"message":"Router not found for request GET //notes/root/export"}.
Server is Synology NAS with zadam/Trilium running in a container. It works as expected interactively via browser.

Win10 Git Bash console session:

export TRILIUM_TOKEN=T83DaEf4*******************************64WRl8=
export TRILIUM_SERVER=http://nas:8080/

# indivudual branch:
curl -H "Authorization: Basic ${TRILIUM_TOKEN}" ${TRILIUM_SERVER}/notes/FlE3sCcgtRkW/export 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    66  100    66    0     0    186      0 --:--:-- --:--:-- --:--:--   186{"message":"Router not found for request GET //notes/root/export"}

#everything:
curl -H "Authorization: Basic ${TRILIUM_TOKEN}" ${TRILIUM_SERVER}/notes/root/export`
**  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    66  100    66    0     0    186      0 --:--:-- --:--:-- --:--:--   186{"message":"Router not found for request GET //notes/root/export"}
**

Am I missing something in my command line?

Error logs

04:12:48.802 Slow 304 GET /api/sync/check with 10475 bytes took 32ms
04:12:59.696 200 GET /api/health-check with 15 bytes took 2ms
04:13:09.851 Error: Router not found for request POST /api/notes/FlE3sCcgtRkW/export
04:13:30.300 200 GET /api/health-check with 15 bytes took 2ms
04:13:33.701 Error: Router not found for request POST /etapi/notes/FlE3sCcgtRkW/export
04:13:40.698 304 GET /api/setup/status with 59 bytes took 2ms
04:13:40.731 200 POST /api/login/sync with 54 bytes took 3ms
...
20:49:26.253 200 GET /api/health-check with 15 bytes took 2ms
20:49:27.322 Error: Router not found for request GET //notes/root/export
20:49:42.843 304 GET /api/setup/status with 59 bytes took 2ms
20:49:42.853 200 POST /api/login/sync with 54 bytes took 3ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions