| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | POST {{triliumHost}}/etapi/create-note | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | Content-Type: application/json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "parentNoteId": "root", | 
					
						
							|  |  |  |   "type": "text", | 
					
						
							|  |  |  |   "title": "Hello", | 
					
						
							|  |  |  |   "content": "" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > {% client.global.set("createdBranchId", response.body.branch.branchId); %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PATCH {{triliumHost}}/etapi/branches/{{createdBranchId}} | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | Content-Type: application/json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "prefix": "pref", | 
					
						
							|  |  |  |   "notePosition": 666, | 
					
						
							|  |  |  |   "isExpanded": true | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | GET {{triliumHost}}/etapi/branches/{{createdBranchId}} | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | > {%  | 
					
						
							|  |  |  | client.assert(response.status === 200); | 
					
						
							|  |  |  | client.assert(response.body.prefix === 'pref'); | 
					
						
							|  |  |  | client.assert(response.body.notePosition === 666); | 
					
						
							|  |  |  | client.assert(response.body.isExpanded === true); | 
					
						
							|  |  |  | %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PATCH {{triliumHost}}/etapi/branches/{{createdBranchId}} | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | Content-Type: application/json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "parentNoteId": "root" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > {%  | 
					
						
							|  |  |  |     client.assert(response.status === 400);  | 
					
						
							| 
									
										
										
										
											2022-01-12 19:32:23 +01:00
										 |  |  |     client.assert(response.body.code == "PROPERTY_NOT_ALLOWED"); | 
					
						
							| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | %} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PATCH {{triliumHost}}/etapi/branches/{{createdBranchId}} | 
					
						
							| 
									
										
										
										
											2022-01-10 17:09:20 +01:00
										 |  |  | Authorization: {{authToken}} | 
					
						
							| 
									
										
										
										
											2022-01-07 19:33:59 +01:00
										 |  |  | Content-Type: application/json | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   "prefix": 123 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | > {%  | 
					
						
							|  |  |  |     client.assert(response.status === 400);  | 
					
						
							|  |  |  |     client.assert(response.body.code == "PROPERTY_VALIDATION_ERROR"); | 
					
						
							|  |  |  | %} |