| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | POST {{triliumHost}}/etapi/create-note | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | Content-Type: application/json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "parentNoteId": "root", | 
					
						
							|  |  |  |   "title": "title", | 
					
						
							|  |  |  |   "type": "text", | 
					
						
							|  |  |  |   "content": "{{$uuid}}" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > {% client.global.set("createdNoteId", response.body.note.noteId); %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | GET {{triliumHost}}/etapi/notes/{{createdNoteId}}/content | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | > {% client.global.set("content", response.body); %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | GET {{triliumHost}}/etapi/notes?search={{content}}&debug=true | 
					
						
							|  |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | > {% | 
					
						
							|  |  |  | client.assert(response.status === 200); | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | client.assert(response.body.results.length === 1); | 
					
						
							| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Same but with fast search which doesn't look in the content so 0 notes should be found | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | GET {{triliumHost}}/etapi/notes?search={{content}}&fastSearch=true | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | > {% | 
					
						
							|  |  |  | client.assert(response.status === 200); | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | client.assert(response.body.results.length === 0); | 
					
						
							| 
									
										
										
										
											2022-01-08 13:18:12 +01:00
										 |  |  | %} |