To write one record, you must have right to the data and use the maindata url to update them using a HTTP PUT command and create a new record using a HTTP POST command. The format of the url is; /maindata/tablename/recno/?dataeaseqyery&othersetting= etc.

/maindata/ tells the server to give you one record of the selected table.

/tablename/ tells what table to fetch the data.

/recno/ tells the record to fetch based in the query.

The query format is the same as for any other query in server. The first part between ? and the first & is a query as your write it in DataEase. This mean you can write a Name="A*" to get all records with a text field starting on A. You can also use all other operators like AND, OR, BETWEEN, >, >=, <, <=, =, not = etc. So if you want a record where Name starts on A and regdate is between to dates your write "Name="A*" AND regdate between 10/10/20 to 12/10/20". If you want to get the results in acending or decending order based on a field, you add this as "&regdate=in order".

Ex. /maindata/Address/0/?Name="A*" AND regdate between 10/10/20 to 12/10/20&regdate=in order&jsonpretty=1&getrecordcount=1

This query will return the first record matching Name="A*" and reg date between the 10/10/20 and 12/10/20 in acending order on regdate is formatted json and also add the number of record matched. Then the data will be saved to the first record in the matching result.

The payload you send to the server should have the format application/json and be structured like this:

{ 	
	'recorddata' : {
 		'Name' : 'Bjorn',
 		'Country' : 'Norway',
 		'Street' : 'Smal smauet',
 		'Postno' : '1234',
 		'PostAddr' 'Lillesand'
}

The return value from the PUT or POST is the same as from read data. It will return with the same recno as you sent, so you can not rely on this number when doing a subsequent query unless you are the only user of the system. The data is reread from the multiview to reflect any triggered derivations on the original table.