2 Replies Latest reply on Apr 18, 2019 11:36 AM by Andrew Yan

    Multiple API endpoints and flexible query parameters

    Andrew Yan

      I was reading through the tutorials at WDC Tutorial  and WDC Multiple Tables Tutorial and noticed that specification of the API endpoints, query parameters, and table schemas are explicitly into the Javascript examples. There is the implication that every different permutation of endpoint and query parameters would be its own Javascript file. This is fine if one knows exactly what they want and will always want that one thing, but I'm looking a use-case where there are multiple endpoints for a REST API (e.g. /monitoring-locations, /samples, /results, etc.) with many different permutations of query parameters (e.g. startDate, endDate, characteristic, organization, etc). So would every endpoint within a REST API need its own `getData` method call or is there a more general way to do that?