BioT Interceptor Plugins

BioT Interceptor plugins are lambda code that is called before or after an API call and lets the plugin modify the call request or response accordingly. The plugins are useful when you want to modify an API request before it is processed by BioT or modify the response before it arrives to the UI.

Flow Example

720

Subscribing to Events

Each service in BioT has an "Interception API" that allows you to subscribe, unsubscribe and search for existing subscriptions.
To subscribe to an API, call the subscribe API of the service:
POST ​​<https://your-biot-domain.com/><service>/v1​/hooks​/interceptions​/subscribe

ParameterDescriptionFormat
typeThe type of subscription. The supported values are:
- PRE_REQUEST (Modify the request)
- POST_REQUEST (Modify the response)
- ADAPT_ENTITY (Modify the entity - see entityName description below)
Mandatory
String
apiIdThe ID of the API that you want to subscribe to. This only applies to PRE_REQUEST & POST_REQUEST types.
For possible values, see the API documentation for the service you are subscribing to.
Optional
String
For example:
POST/organization/v1/users/patients
entityNameThe entity name that you want to modify.
Provided only if type=ADAPT_ENTITY.
For possible values, see the API documentation for the service you are subscribing to.
Optional
String
For example:
patient
endpointA valid URI for the platform to call when the event is triggered.
Mandatory.
String

Unsubscribing from Events

Using the same "interception" service, you can unsubscribe from an event.
To unsubscribe from an event, call the unsubscribe API of the service:
POST ​<https://your-biot-domain.com/><service>/v1/hooks/interceptions/unsubscribe

The call body should be the same as the subscribed call, just without the endpoint.
For example:

{
  "type": "PRE_REQUEST",
  "apiId": "POST/organization/v1/users/patients"
}