Swagger UI

It is a tool which helps test and document *REST API easily.

[Request methods for REST API]

We recommend that you should use the New Local API. When you send the message to BioStar 2 via API, you have to use the URL format below:
https://[Your BioStar 2 Server IP]:[BioStar 2 port]/swagger/index.html

We provide the information on BioStar 2 API through the Swagger UI so that you can check kinds of APIs and those model schemas before calling API. Below is an example for the way to utilize this tool by using login API.

How to utilize Swagger UI

  • POST /api/login API

1) Click ‘Try it out’ button which located in the right upper corner to edit the request body.
2) Enter the values to login BioStar 2.
3) After enter the values, click ‘Execute’ button in below the screen to check the result about response message.

How to utilize Postman with Swagger UI

Postman is a utilize App which helps you confirm the result of calling API easily. We recommend you to use it. By using the postman, you can construct complex HTTP quickly, organize them in collections, and share them with your co-workers. The biggest advantage is that the history you call API is remained.

You can download the Postman through searching Google.
Download Postman

  • POST /api/login API

In the Swagger UI ..
1) Copy all data shown in the body.

In the Postman ..
2) Select POST in the dropbox and then enter the URL to call login API.
3) Select Body – raw – JSON(application/json).
4) Paste the data copied from Swagger UI into the Postman.
5) Enter the values to login.
6) Click the Send button.
7) The response result will be displayed at the bottom of the section.

  • GET /api/users API

In the Postman ..
1) Execute login API in Postman.
2) If you succeed to login, copy the value of ‘bs-session-id’ in the response’s headers.
3) Select GET in the dropbox and then enter URL to call retrieving user API.
4) Select Headers and click ‘Bulk Edit’.
5) Enter the values such as below:
bs-session-id:[You copied value]
6) Click the Send button.
7) The response result will be displayed at the bottom of the section.