mirror of https://github.com/TriliumNext/Notes
etapi fixes + basic test
parent
e8acf3f9f3
commit
e3114e0602
@ -0,0 +1,39 @@
|
|||||||
|
POST {{triliumHost}}/etapi/notes
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"parentNoteId": "root",
|
||||||
|
"title": "Hello",
|
||||||
|
"type": "text",
|
||||||
|
"content": "Hi there!"
|
||||||
|
}
|
||||||
|
|
||||||
|
> {%
|
||||||
|
client.test("Request executed successfully", function() {
|
||||||
|
client.assert(response.status === 200, "Response status is not 200");
|
||||||
|
});
|
||||||
|
|
||||||
|
client.global.set("createdNoteId", response.body.note.noteId);
|
||||||
|
client.global.set("createdBranchId", response.body.note.branchId);
|
||||||
|
%}
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
POST {{triliumHost}}/etapi/attributes
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"noteId": "{{createdNoteId}}",
|
||||||
|
"type": "label",
|
||||||
|
"name": "mylabel",
|
||||||
|
"value": "val",
|
||||||
|
"isInheritable": "true"
|
||||||
|
}
|
||||||
|
|
||||||
|
> {%
|
||||||
|
client.test("Request executed successfully", function() {
|
||||||
|
client.assert(response.status === 200, "Response status is not 200");
|
||||||
|
});
|
||||||
|
|
||||||
|
client.global.set("createdAttributeId", response.body.attributeId);
|
||||||
|
%}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"dev": {
|
||||||
|
"triliumHost": "http://localhost:37740"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue