Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

So, I knocked a quick web service and have proxied it from pswww-dev. This web service (https://github.com/slaclab/psdm_mongo_ws) is a suggestion only; please let me know if you need something different. 
These are examples of getting data over HTTPS from a batch node from within cori; needless to say, the URL prefix is https://pswww-dev.slac.stanford.edu/calib_ws

Two users:

  • mongo --host=psdb-dev --port 9306 -u "dubrovin" -p "...." --authenticationDatabase "admin"
  • mongo --host=psdb-dev --port 9306 -u "calibuser" -p "...." --authenticationDatabase "admin"

Test commands:

  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/test_db/test_coll/5b649a9df59ae00bda110168"
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/test_db/test_coll"
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/test_db/test_coll?item=planner&size.uom=cm"
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/test_db/test_coll?query_string=%7B%20%22item%22%3A%20%22planner%22%2C%20%22qty%22%3A%2075%20%7D%0A"
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/" - get string of databases
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/test_db" - get list of collections in database
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/cdb_cxic0415/cspad_detnum1234?ctype=pedestals&data_size=2296960&run=74" - find and return document for query
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/cdb_cxic0415/cspad_detnum1234/gridfs/5b6893e81ead141643fe4344" - get document with constants from GridFS using document id
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/cdb_cxic0415/cspad_detnum1234/gridfs/5b6893e81ead141643fe4344" - DEPRICATED - access to GridFS raw data through doc _id
  • curl -s "https://pswww-dev.slac.stanford.edu/calib_ws/cdb_cxic0415/gridfs/5b6893d91ead141643fe3f6a"  - access to GridFS raw data through data _id

...