docker pull registry.datatailor.be/blackbar-api
docker run --env-file .env -p 8000:8000 registry.datatailor.be/blackbar-api
API
In order to integrate the anonymization and pseudonymization in your daily operations, you can either perform batch operations or do requests to the blackbar API.
The API allows you to
- Get the list of available models
- Show the model behaviour on texts
- Anonymize and Pseudonymize texts in your database
To deploy the API, pull the image and host it, run the following code and visit the swagger at 127.0.0.1/docs/ If you want to test the API based on the test database, set environment variable BLACKBAR_DB=test
in .env
Authentication to the API is by passing a token in the ´api-key´ header. You can get a token by calling the /auth/new api with key which is set up with the environment variable ´BLACKBAR_API_SECRET´. The token expires by default after 365 days or earlier as specified with environment variable ´BLACKBAR_API_EXPIRATION´.
With the following environment variables which can be set in .env
, you can specify the password to the API which can be used in order to retrieve tokens, after how many days the tokens expire and optionally the root path which can be set in case you put the API behind a reverse proxy. E.g.
- BLACKBAR_API_SECRET=blackbar
- BLACKBAR_API_EXPIRATION=365
- BLACKBAR_API_ROOT_PATH=/API
API for anonymization & pseudonymization
API for active learning in the Inception annotation tool