12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- POST {{triliumHost}}/etapi/create-note
- Authorization: {{authToken}}
- Content-Type: application/json
- {
- "parentNoteId": "root",
- "title": "GetInheritedAttributes Test Note",
- "type": "text",
- "content": "Hi there!"
- }
- > {%
- client.assert(response.status === 201);
- client.global.set("parentNoteId", response.body.note.noteId);
- %}
- ###
- POST {{triliumHost}}/etapi/attributes
- Authorization: {{authToken}}
- Content-Type: application/json
- {
- "noteId": "{{parentNoteId}}",
- "type": "label",
- "name": "mylabel",
- "value": "val",
- "isInheritable": true
- }
- > {% client.global.set("createdAttributeId", response.body.attributeId); %}
- ###
- POST {{triliumHost}}/etapi/create-note
- Authorization: {{authToken}}
- Content-Type: application/json
- {
- "parentNoteId": "{{parentNoteId}}",
- "title": "Hello",
- "type": "text",
- "content": "Hi there!"
- }
- > {%
- client.global.set("createdNoteId", response.body.note.noteId);
- client.global.set("createdBranchId", response.body.branch.branchId);
- %}
- ###
- GET {{triliumHost}}/etapi/notes/{{createdNoteId}}
- Authorization: {{authToken}}
- > {%
- client.assert(response.status === 200);
- client.assert(response.body.noteId == client.global.get("createdNoteId"));
- client.assert(response.body.attributes.length == 1);
- client.assert(response.body.attributes[0].attributeId == client.global.get("createdAttributeId"));
- %}
|