generalized crud operations in api