A single transaction can be added by PUT to /add. (I read that PUT, not POST, should be used to create; perhaps the web add form should also use PUT ?) As with the web form, the `add` capability is required (and enabled by default). Here's how to test with curl: $ curl -s http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @in.json; echo New readJsonFile/writeJsonFile helpers in Hledger.Web.Json are handy for generating test data. Eg: >>> writeJsonFile "in.json" (head $ jtxns samplejournal)
		
			
				
	
	
		
			21 lines
		
	
	
		
			820 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			820 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/favicon.ico     FaviconR        GET
 | 
						|
/robots.txt      RobotsR         GET
 | 
						|
/static          StaticR         Static getStatic
 | 
						|
 | 
						|
/                RootR           GET
 | 
						|
/journal         JournalR        GET
 | 
						|
/register        RegisterR       GET
 | 
						|
/add             AddR            GET POST PUT
 | 
						|
 | 
						|
/manage             ManageR         GET
 | 
						|
/edit/#FilePath     EditR           GET POST
 | 
						|
/upload/#FilePath   UploadR         GET POST
 | 
						|
/download/#FilePath DownloadR       GET
 | 
						|
 | 
						|
/accountnames                      AccountnamesR         GET
 | 
						|
/transactions                      TransactionsR         GET
 | 
						|
/prices                            PricesR               GET
 | 
						|
/commodities                       CommoditiesR          GET
 | 
						|
/accounts                          AccountsR             GET
 | 
						|
/accounttransactions/#AccountName  AccounttransactionsR  GET
 |