Restful handler for api routing.