Rest function added to retrieve objects
Added post function