A new API has been released with BioStar v2.7.10, it is integrated by default in all later BioStar 2 versions as well.


One main difference from the old API is that the new API does not require a separate API server installation to use the APIs. Just install or upgrade to BioStar 2.7.10 to use the new API.

* Please note that the old Local API server(v2.6.3) is compatible with BioStar 2.7.10 *


Another key difference is that the new API supports all of BioStar 2's AC features whereas the old API supported only part of BioStar 2's AC features. 



API Documentation : https://bs2api.biostar2.com/ 

The API documentation has a lot of information regarding BioStar 2 New Local APIs. 

Please check out the link if you are looking for APIs or details regarding specific APIs. 


Swagger Page  : [BioStar 2 IP address] + '/swagger/index.html'

ex) BioStar 2 address > https://192.168.16.35:456

     New BioStar 2 API Swagger> https://192.168.16.35:456/swagger/index.html


If you activated BioStar 2 Cloud service, then you can access the Swagger Page by using your Cloud address as well instead of the IP address. 



In order to use the new API, you need to save the session id that can be obtained through the login API to authorize and use any of the other BioStar 2 APIs. 


How to save session id for authorization in Swagger : 

  1. Login using '[POST] /api/login' API.
  2. Get the cookie from the response.
  3. Click the button named 'Authorize'.
  4. Save the result of the cookie that you get from the response.


e. If you have successfully saved the session id and authorized, you can see that the lock icon is changed.


f. Now you are authorized to use any of the BioStar 2's APIs in Swagger. 



How to save session id for authorization in Postman :


a. Login using POST /api/login API with login credentials as parameters. Then click Send. 


b. Find the session id from response header. 


c. When you are trying to call other APIs, please add this value in the header of request with key "bs-session-id". 



  * If you have the issue about 'session-id', please refer to the article below.

[BioStar 2 API] LOGIN REQUIRED error - Session is expired