Restful API for CRUD operation in Symfony2