Merge with Basilis REST code.