pst rest api design