This is an old revision of the document!



Swagger UI

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

[Request methods for REST API]


When you send the message to BioStar Server via API, you have to use URL format below:
https://api.biostar2.com/v2/ [url path displayed API reference]

The URL is different depending on BioStar 2 version.


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 /login API

1) Click yellow box about Model Schema in Parameters section. Then, these contents will be copied and pasted into the Value (white box) in the same section.
2) Type the values in the white box in order to login to BioStar 2.
3) Click Try it out button to check the result about response message.




How to utilize Postman with Swagger UI

Postman is a Chrome 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 requests 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 the Chrome web store.
https://chrome.google.com/webstore/search/Postman?hl=en

  • POST /login API

In the Swagger UI ..
1) Click yellow box about Model Schema in Parameters section. Then, these contents will be copied and pasted into the Value (white box) in the same section.
2) Copy all data shown in the white box.



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




  • GET /login API

In the Swagger UI ..
1) Check Parameter in Parameters section. Both limit and offset are mandatory as URL parameters.



In the Postman ..
2) Select GET in the drop box and then enter URL to call login API. In case of GET message, you should use the necessary parameters in the URL.

Please note that there should be no space in the URL

3) Click Send button.
4) The response result will be displayed in the bottom of section.