rwslib builders and requests-mauth Authentication
In November 2014 we announced the availability of rwslib, a python library which provides helpers to access Rave Web Service (RWS) APIs. That release included Builders for creating CDISC ODM messages for clinical data exchange (e.g. uploading a blood pressure reading or demographic information to Rave EDC). The latest version of rwslib improves on these builders and provides support for our own MAuth authentication scheme via a separate requests-mauth library which we are also releasing as Open Source under a MIT license.
We have been using rwslib in our own projects, notably our MOVE-2014 trial on wearable sensors trial to transfer data into Rave EDC.
For our own proof-of-concept work we needed to create study metadata in Rave EDC (i.e. upload study designs) and we took this as an opportunity to expand the builders available in the library to support CDISC ODM Metadata including Medidata’s own extensions.
A comprehensive example of creating a Rave study draft complete with folders, forms, edit checks, derivations etc can be found in the builders example documentation.
MAuth and requests-mauth
Medidata’s other API’s, such as the iMedidata user and site API use MAuth authentication, a request signing authentication scheme. We are now releasing requests-mauth a python library that makes working with the python requests HTTP library and MAuth a breeze:
But what if you want to use MAuth with RWS? Normally you need to provide rwslib with the username/password of a Rave user to authenticate using basic authentication. However, Rave can be set up to recognize an MAuth App and signature as being on-behalf-of a Rave user. In the latest version of rwslib you can now pass an MAuth authentication object to a rwslib.RWSConnection object to use MAuth authentication:
requests-mauth and the updates to rwslib make Medidata APIs more accessible than ever for python programmers. Good luck with your own integrations!