diff --git a/README.md b/README.md index 70072b9..1b11e42 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ curl -d '{"variables":[{"variable_type": "concept", "concept_id": 2000000324},{" Histogram endpoint: ```bash -curl -d '{"variables":[{"variable_type": "custom_dichotomous", "cohort_ids": [1, 4]}]}' -H "Content-Type: application/json" -X POST http://localhost:8080/histogram/by-source-id/1/by-cohort-definition-id/4/by-histogram-concept-id/2000006885 +curl -d '{"variables":[{"variable_type": "custom_dichotomous", "cohort_ids": [1, 4]}, {"variable_type": "concept", "concept_id": 2000006885}]}' -H "Content-Type: application/json" -X POST http://localhost:8080/histogram/by-source-id/1/by-cohort-definition-id/4 ``` # Deployment steps diff --git a/server/router.go b/server/router.go index 7997d0e..5eda8f0 100644 --- a/server/router.go +++ b/server/router.go @@ -57,7 +57,7 @@ func NewRouter() *gin.Engine { authorized.POST("/cohort-stats/by-source-id/:sourceid/by-cohort-definition-id/:cohortid/by-concept-id/:conceptid", cohortData.RetrieveStatsForCohortIdAndConceptId) // histogram endpoint - authorized.POST("/histogram/by-source-id/:sourceid/by-cohort-definition-id/:cohortid/by-histogram-concept-id/:histogramid", cohortData.RetrieveHistogramForCohortIdAndConceptId) + authorized.POST("/histogram/by-source-id/:sourceid/by-cohort-definition-id/:cohortid", cohortData.RetrieveHistogramForCohortIdAndConceptId) // Data Dictionary endpoint authorized.GET("/data-dictionary/Retrieve", cohortData.RetrieveDataDictionary)