api_request function

The very general wrapper from EpiGraphDB endpoint request