WIP records: REST API addition

Is a special case needed here - i..e. it looks like double work, first decoding JSON, then encoding it again.