User Tools

Site Tools


webapi_swagger_documentation

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
webapi_swagger_documentation [2018/07/06 09:46 (6 years ago)] kevinwebapi_swagger_documentation [2018/07/12 10:00 (6 years ago)] gking_windwardsoftware.com
Line 36: Line 36:
  
 The contents of the response from the calls is the Swagger 2.0 documentation, after copying the response text and saving it into a text file use your preferred Swagger editor (we suggest [[http://editor2.swagger.io|editor2.swagger.io]]) to view the Swagger documentation. The contents of the response from the calls is the Swagger 2.0 documentation, after copying the response text and saving it into a text file use your preferred Swagger editor (we suggest [[http://editor2.swagger.io|editor2.swagger.io]]) to view the Swagger documentation.
 +
 +After configuring your S5WebAPISvc.ini, you can view and interact with the Swagger 2.0 documentation and the Web API through a browser, without using Postman or a Swagger editor.
  
 ==== Getting The Swagger 2.0 Documentation Using Postman ==== ==== Getting The Swagger 2.0 Documentation Using Postman ====
Line 58: Line 60:
   - The list of available methods are now listed on the right side of the screen.  Each method has two sections, a Parameters and a Response section, these sections outline the format for both the request parameters and the response.   - The list of available methods are now listed on the right side of the screen.  Each method has two sections, a Parameters and a Response section, these sections outline the format for both the request parameters and the response.
 {{:swagger_io_json.jpg?400|}} {{:swagger_io_json.jpg?400|}}
 +
 +
 +==== Interacting With The Swagger 2.0 Documentation Via A Browser ====
 +  - As of Beta 6.2.7, The Swagger 2.0 documentation can be viewed and interacted with through a browser.
 +  - Using a set of options in the S5WebAPISvc.ini file, the configuration of the Swagger publishing can be set and changed.
 +    - {{:undefined:swagger_ini_options.png?200|}} 
 +  - Once the S5WebAPISvc.ini options have been set, and the WebAPI service is running, open a web browser and enter localhost:PORT/index.html into the address bar
 +    - Where PORT is the port under the Swagger Publishing options in S5WebAPISvc.ini
 +  - After entering the WebAPI credentials and clicking the 'Submit' button, the swagger-ui page will be shown.
 +  - On this page, edit the contents of the search/explore bar. Changing the values for PORT, and ENDPOINT
 +    - PORT is the port that the WebAPI is listening on (specified in S5WebAPISvc.ini, under the HTTP/HTTPS option)
 +    - ENDPOINT is any one of the endpoints of the WebAPI.
 +  - After clicking on the 'Explore' button and waiting for the Swagger 2.0 documentation to load, click on the 'Authorize' button and reenter the WebAPI credentials, this must be done before being able to call any of the endpoint's methods.
 +  - Once authorized the Swagger 2.0 documentation and WebAPI service can be interacted with.
 +    - By clicking on an API method, the page will show more information for the method.
 +    - Clicking the 'Try It Out' button allows users to enter parameters, and run the method.
 +    - Clicking the 'Execute' button will send the method and it's parameters (if any) to the API, giving back the API's response. 
  
webapi_swagger_documentation.txt · Last modified: 2022/02/23 13:40 (2 years ago) by kevin