Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:how_to_use_swagger_ui_and_postman_for_biostar_2_api [2017/06/27 16:02]
127.0.0.1 external edit
en:how_to_use_swagger_ui_and_postman_for_biostar_2_api [2021/08/19 09:05]
kate removed
Line 8: Line 8:
 {{:​en:​api_9.png?​nolink&​700|}} ​ \\ \\ {{:​en:​api_9.png?​nolink&​700|}} ​ \\ \\
  
 +We recommend that you should use Local API(after installing BioStar 2 API Server on local PC where BioStar 2 Server is installed).
 When you send the message to BioStar Server via API, you have to use URL format below: ​ \\ 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]// ​ \\ \\+http://127.0.0.1:8795/v2/ //[url path displayed API reference]// ​ \\ \\
  
  
 The URL is different depending on BioStar 2 version. ​ \\ The URL is different depending on BioStar 2 version. ​ \\
-  * BioStar v2.3 or below (v1 API) - https://api.biostar2.com/​v1/​docs/ ​ \\ +  * BioStar v2.3 or below (v1 API) - http://127.0.0.1:8790/​v1/​docs/ ​ \\ 
-  * BioStar v2.4 or above (v2 API) - https://api.biostar2.com/​v2/​docs/ ​ \\+  * BioStar v2.4 or above (v2 API) - http://127.0.0.1:8795/​v2/​docs/ ​ \\
  
 {{:​en:​api_4.png?​nolink&​700|}} \\ {{:​en:​api_4.png?​nolink&​700|}} \\
Line 42: Line 42:
  
 In the Postman .. \\ In the Postman .. \\
-3) Select **POST** in the drop box and then enter URL to call login API. \\+3) Select **POST** in the drop box and then enter URL to call login API. In case of Local API, you should enter the URL like "​http://​127.0.0.1:​8795/​v2/​login" ​\\
 4) Select **Body – raw – JSON(application/​json)** like below green box. \\ 4) Select **Body – raw – JSON(application/​json)** like below green box. \\
 5) Paste the data copied from Swagger UI into the Postman. \\ 5) Paste the data copied from Swagger UI into the Postman. \\
Line 58: Line 58:
  
 In the Postman .. \\ 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. \\+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. In case of Local API, you should enter the URL like "​http://​127.0.0.1:​8795/​v2/​users/​limit=5&​offset=0" ​\\
  
 <callout type="​warning"​ icon="​true"> ​ <callout type="​warning"​ icon="​true"> ​