Closed st3iny closed 2 years ago
0.53.2
Other Linux
Server access only
Docker Image
I'm not able to create branches via the ETAPI. Posting a body with and without parentNodeId fails. The branch I'm trying to create does not exist yet.
parentNodeId
curl --request POST \ --url https://[REDACTED]/etapi/branches \ --header 'Authorization: [REDACTED]' \ --header 'Content-Type: application/json' \ --data '{ "noteId": "YH9DW9VNzeDt", "parentNodeId": "w7XEQyNMjzJi" }'
{ "status": 400, "code": "PROPERTY_NOT_ALLOWED", "message": "Property 'parentNodeId' is not allowed for PATCH." }
curl --request POST \ --url https://[REDACTED]/etapi/branches \ --header 'Authorization: [REDACTED]' \ --header 'Content-Type: application/json' \ --data '{ "noteId": "YH9DW9VNzeDt" }'
{ "status": 500, "code": "GENERIC", "message": "NOT NULL constraint failed: branches.parentNoteId" }
Hi, you have a typo in the property name, it's parentNoteId, not parentNodeId. Easy mistake to make ...
Wow, thanks. Sometimes a second pair of eyes really helps ...
Trilium Version
0.53.2
What operating system are you using?
Other Linux
What is your setup?
Server access only
Operating System Version
Docker Image
Description
I'm not able to create branches via the ETAPI. Posting a body with and without
parentNodeId
fails. The branch I'm trying to create does not exist yet.Posting with
parentNodeId
Posting without
parentNodeId