added contnet-type application/json to API endpoints and tests