Cfy 1163 flatten rest api