Hubro Documentation Help

Integrating Hubro with your application

While Hubro can operate independently as a comprehensive electronic clinical study management system, its capabilities are enhanced when integrated with applications. For instance, study administrators can leverage the system's features to gather data from diverse wearable sensors or utilize Hubro as an authentication backend.

Hubro Connect is a library designed to facilitate the seamless integration of Hubro with smartphone or web applications. With Hubro Connect, users can:

Hubro Connect is designed for major mobile platforms such as iOS and Android, as well as for web applications built using frameworks such as Angular.

Alternatively, we offer Swagger documentation for the REST API utilized by Hubro Connect. Should you have specific requirements, you have the option to independently implement the communication layer with Hubro.

Authentication

Hubro can serve as the authentication backend for your application. In fact, Hubro supports two fundamental authentication methods: a username/password-based authentication with optional OTP verification, utilizing Hubro as an identity manager; or a federated authentication regime, in which you can delegate the authentication to a 3rd party component.

POST method/connect/auth

Request parameters

{ "username": "sample-user", "password": "sample-password" }

Responses

{ "transactionId": "example" }

2-factor authentication

If the study is created with a 2-factor authentication enabled, the authentication process has to follow with a REST call that verifies received OTP (either via SMS or email). In addition, the call needs to be accompanied by the transactionId coming from the previous authentication call.

POST method/connect/auth/verify

Request parameters

{ "transactionId": "23rfsf3eyusdfjk27ewjkhcsd722", "code": "123456" }

Responses

Refreshing access token

Access token can be renewed by using the refresh token and requesting the access token using the endpoint below. A new token set (access token, refresh token) is issued if the call is successful and the former refresh token is invalidated.

POST method/connect/auth/refresh

Request parameters

Responses

Data gathering

Hubro Connect seamlessly integrates with the HL7 FHIR server, serving as the primary storage for personal data. Our goal is to maintain a coherent data structure throughout the entire data gathering process making HL7 FHIR first-class citizen in the system.

Hubro Connect can be used to fetch data from smartphone's local storages.

POST method/connect/observing

Request parameters

{ "type": "", "value": 1718946262, "dateTime": 1718946262, "unit": 'mmol/l', "device": 'Sample device' }

Responses

Questionnaire distribution

Questionnaires that are assigned to participants through the Hubro admin interface can be interpreted in connected applications as well. This way you can let your users to fill in questionnaires directly in the UI of your application. If your application is a smartphones, a preferred way to present questionnaires in your application is via WebView based on data received from the following API call.

GET method/connect/directs/questionnaires

Request parameters

Responses

Notifications

The Hubro Connect API, a central component of the Hubro ecosystem, facilitates communication and shares Firebase tokens to the Hubro backend. This tool has become an integral part of this system and is designed to assist developers in the technical integration process. In the recent update, we have modernized our application by integrating Firebase using the new HTTP v1 protocol. HTTP v1 protocol is the most recent version introduced by Firebase that offers robust, versatile, and secure solutions to handle transactions.

Firebase tokens, unique identifiers that authenticate users in their respective Firebase projects, can be shared using the Hubro Connect API.

Sharing user's Firebase token with Hubro backend

Use the following API endpoint or respective Hubro Connect library call to share user's Firebase token with Hubro.

POST method/connect/auth/firebaseToken

Request parameters

{ "token": "eeAoSgepdsf3fa3zV1ioVw8:APA98jdg-NjsUE7CwjBuCqkK8XywPw-xZNd427O3ExBaNZgABQ0jo1mITldB3EEcTT_tIHPsNnQH6cUHTu4DzJ3msiBZEfJX2pdoZwtzeS2aO4gkfa-wg_vHkwmkOULC4s-5cGWS", "validUntil": 1718946262 }

Responses

Issue notifications to individual users from plugins

Notifications can be issued from enabled plugins. Plugin developer can use Hubro SDK to send notifications to specific users/devices, that have previously shared the Firebase token using the Hubro Connect API. Refer to the documentation of Hubro SDK where we describe how notifications and other outbound communication channels can be used from plugins.

AI inference

AI algorithms that are deployed and registered in Hubro (see section AI inference), can be called for inference remotely through the Hubro Connect API.

Identifying the algorithm

In order to call the inference API of Hubro Connect, one needs to know the ID of the algorithm. That can be determined through the Hubro UI. Navigate to the detail of the study

Last modified: 23 September 2024