REST interface, initial work for the segment models.