mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	
		
			
	
	
		
			26 lines
		
	
	
		
			545 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			545 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
								 | 
							
								POST {{triliumHost}}/etapi/create-note
							 | 
						||
| 
								 | 
							
								Authorization: {{authToken}}
							 | 
						||
| 
								 | 
							
								Content-Type: application/json
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								  "parentNoteId": "root",
							 | 
						||
| 
								 | 
							
								  "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}}/content
							 | 
						||
| 
								 | 
							
								Authorization: {{authToken}}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								> {%
							 | 
						||
| 
								 | 
							
								    client.assert(response.status === 200);
							 | 
						||
| 
								 | 
							
								    client.assert(response.body === "<p>Hi there!</p>");
							 | 
						||
| 
								 | 
							
								%}
							 |