Rest API for layout switching