OHDSI Home | Forums | Wiki | Github

OHDSI on AWS WebAPI Error

webapi

#1

Hi there! I’ve been testing the latest OHDSI on AWS CloudFormation templates. The templates seem to deploy the stack (including the WebAPI) successfully, and I can hit the API to return the version with http://[domain].elasticbeanstalk.com/WebAPI/info.

When I point the request toward /cohortdefinition instead of /info, I expect to receive receive a list of cohort definitions but instead receive a 401 status. Hitting the public OHDSI endpoint at http://ohdsi.org/web/atlas/WebAPI/cohortdefinitions returns the list of cohort definitions as expected. On the CloudFormation-deployed WebAPI, I receive the following error message:

cohort undefined
(node:5852) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'data' of undefined
    at getPermission (./atlas.mjs:82:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Running a curl command directly on the deployed ATLAS server produces a similar result (no data returned):

curl -v http://localhost:8080/WebAPI/cohortdefinition
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8080 (#0)
 GET /WebAPI/cohortdefinition HTTP/1.1
 Host: localhost:8080
 User-Agent: curl/7.61.1
 Accept: */*

 HTTP/1.1 401
 Cache-Control: no-store
 Pragma: no-cache
 Transfer-Encoding: chunked

* Connection #0 to host localhost left intact

What could I be missing? Any help troubleshooting this issue would be much appreciated, thanks!


t