- Using APIs
- Use CSV export using query module
Use APIs
OpenSpecimen is a 100% REST API enabled application, which means each and every object can be created, read, updated or deleted (CRUD) using an API. The APIs are documented here: /wiki/spaces/CAT/pages/1116035.
Is there an ability to provide authentication by tokens or certificates?
TBD
Can we do read-only API credentialing per Collection Protocol?
Yes. APIs are accessed via a OpenSpecimen user account. The CPs accessible to that user via the UI are the CPs that are accessible via the APIs. You can configure it by going to Users→Roles tab.
Using Query module
OpenSpecimen's Query module supports automated export of data into a CSV file. This CSV file can then be picked by an external program and processed.
Steps:
- Via UI, create a query with filters (e.g. filter by CP) and defined view containing the columns needed by the external system
- Save the query
- Schedule the query to run at regular intervals (E.g. nightly)
- This creates a CSV file in a folder in the server. (VP: which folder/file name convention?)
- Write an external program to monitor this folder and process the CSV files.
The advantage of this approach is that external developers do not have to spend time learning OpenSpecimen APIs.