POST and GET using REST-based API