public static HttpResponseMessage GetParticipants([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "participant/{surveyId:int=10}")] HttpRequestMessage req, int surveyId, TraceWriter log) { log.Info("C# HTTP Get Participants trigger function processed a request."); var participantService = new ParticipantService(); try { return(JsonHelpers.CreateResponse(participantService.GetAllParticipants(surveyId))); } catch (Exception e) { log.Error(e.Message); return(JsonHelpers.CreateResponse(e, HttpStatusCode.InternalServerError)); } }