User Tools

Site Tools


webapi_swagger_documentation

This is an old revision of the document!


Windward Web API Swagger 2.0 Documentation

Summary

The s5webAPI solution runs as a 32 bit service and provides a doorway to push and pull information from a System Five database. This technology will work with both onPrem installations and our System Five on Cloud deployments.

The following is an explanation for retrieving and using the Swagger 2.0 documentation from all available endpoints of the Windward S5WebAPI. Several end points have been marked as deprecated in version 6.2.2.175 which occurred in August of 2018. Deprecated methods will continue to operate but no new development is planned for these areas.

As a developer, keep in mind since this is a 32 bit service, it will not be able to access more than 4GB limited by this address space. Asking for large amounts of data such as inventory should use pagination and will give you better performance and memory utilization.

Be aware that WEB API uses a Pervasive License.

Endpoints

As of the 6.2.2.175 there are multiple endpoints available for the Windward Web API each providing different functions for the S5WebAPI. These endpoints are the following:

  1. APBill
  2. Category
  3. Customer
  4. Inventory
  5. Invoice
  6. Keyword
  7. Units
  8. Vendors
  9. VirtualInventory
  10. TServerMethodsWebAPI

All of these endpoints can be accessed with the following URL:

Deprecated Methods

As of the 6.2.2.175 the following methods in the endpoint TServerMethodsWebAPI are deprecated. Deprecated methods will continue to operate but no new development is planned for these.

  1. Customers_Insert
  2. Customer_Read
  3. Customers_Update
  4. Get_Customers
  5. List_Customers
  6. Parts_Read
  7. Parts_Update
  8. Get_Parts
  9. List_Parts
  10. Insert_Parts
  11. Get_Main_Categories
  12. Get_Categories
  13. Suppliers_Insert
  14. Suppliers_Read
  15. Suppliers_Update
  16. Get_Suppliers
  17. List_Suppliers
  18. Invoices_Insert
  19. Invoices_Get
  20. Invoices_Update
  21. Invoices_Read
  22. Insert_Full_Invoice
  23. Insert_AP_Bill
Any new software development should make use of new methods found within a domains endpoint.

Known Limitations

Prior to 6.2.2.175 released versions of the Web API had a maximum limit of 32 concurrent connections. This limit has been removed and is now limited by how much available memory (max 4GB as this is a 32 bit service) running the API.

Due to the JSON parser that the Windward Web API uses, any '%' characters inside of JSON strings can cause internal server errors. Best practice is to scrub your JSON passed of these characters.

Retrieving The Documentation

The Swagger documentation for a particular endpoint can be retrieved by using a method of the endpoint. Using your preferred method or app (we suggest Postman), send a GET request to the following URL:

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 editor.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

  1. Open Postman.
  2. Set the request type to GET.
  3. Enter one of the URLs, substituting the API_IP_ADDRESS, API_PORT and ENDPOINT placeholders with the appropriate information for your Web API installation:
  4. Set the authorization type to Basic and enter your Web API credentials.
  5. Send the request.
  6. Copy the complete text in the Response area and save it as a text file.

Getting The Swagger 2.0 Documentation Into editor.swagger.io

  1. Open the json file in a text editor and copy the contents to your clipboard
  2. Open a web browser (Google Chrome, for example) and navigate to the following URL:
  3. Click on the 'File' menu.
  4. Click on 'Paste JSON'.
  5. In the Swagger 2.0 documentation dialog Right click and choose Paste from your clipboard
  6. Click on 'Import' button.
  7. 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.

Interacting With The Swagger 2.0 Documentation Via A Browser

  1. As of release 6.2.2.179 Swagger 2.0 documentation can be viewed and interacted with through a browser.
  2. Using a set of options in the S5WebAPISvc.ini file, the configuration of the Swagger publishing can be set and changed.
  3. 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
    1. Where PORT is the port under the Swagger Publishing options in S5WebAPISvc.ini
  4. After entering the WebAPI credentials and clicking the 'Submit' button, the swagger-ui page will be shown.
  5. On this page, edit the contents of the search/explore bar. Changing the values for PORT, and ENDPOINT
    1. PORT is the port that the WebAPI is listening on (specified in S5WebAPISvc.ini, under the HTTP/HTTPS option)
    2. ENDPOINT is any one of the endpoints of the WebAPI.
  6. 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.
  7. Once authorized the Swagger 2.0 documentation and WebAPI service can be interacted with.
    1. By clicking on an API method, the page will show more information for the method.
    2. Clicking the 'Try It Out' button allows users to enter parameters, and run the method.
    3. Clicking the 'Execute' button will send the method and it's parameters (if any) to the API, giving back the API's response.

Samples

What Version are you using?

Depending on the feature you may be looking for in an endpoint you may need to know what version you are running. It is not uncommon to have a training and production WebAPI configured when testing new features. Assuming the API is running, you can access the version using the TServerMethodsWebAPI and the Connect endpoint.

{"result":[{"Response":"Success","CompanyName":"System Five","Serial":"103000",
"Department":"1","ApplicationVersion":"6.2.2.350","DataVersion":"6.2.2.21"}]}

Release 6.2.2.x History

  • Version 6.2.2.540 – November 26, 2019
    • [TFS 19490 / BZ 57767] Added Web Comment support to the /addInventory endpoint.
  • Version 6.2.2.536 – November 20, 2019
    • [BZ 57751 / TFS 19694] Corrected the cause of the crashing by preventing the API from returning all of the invoices when the ZERO parameter is passed. The API now returns nothing in that case. Added 2 new methods to address the need to obtain more than one invoice from the API in a single call.
  • Version 6.2.2.517 – October 29, 2019
    • [TFS 20705] Fix for S5WebAPISvc that was broken due to new data collector list load.
  • Version 6.2.2.491 – September 17, 2019
    • [57680] Corrected a problem that prevented the pagination from working correctly in the Inventory End Point with S5WebAPI service.
  • Version 6.2.2.474 – September 6, 2019
    • [57690] Updated the logging to Log Analytics to better report the start and finish of each API call.
  • Version 6.2.2.441 – July 15, 2019
    • [57554] Corrected a problem in the \addInvoice method of the S5WebAPISvc's Invoice end point. In previous versions, the Billing and Shipping information was not correctly setting the Tax Area on the Invoice and in some specific cases, new Customers were not being added to the system.
  • Version 6.2.2.400 – June 10, 2019
    • [57332] Added KitType, Weight, Instock by Dept, SaleStart, SaleEnd, AltSuply, and Barcodes information to the GET /Inventory end point of the S5WebAPI
  • Version 6.2.2.395 – June 4, 2019
    • [57350] The S5WebAPI /Inventory end point now includes the web comment data.
    • [57267] An e-Commerce filter has been added to the /Inventory end point of the S5WebAPI.
    • [56767] Virtual Warehouse is now considered by the S5WebAPI and the behavior is consistent with System Five.
  • Version 6.2.2.369 – May 7, 2019
    • [57327] Added “Get_Parts_V2” S5WebAPI endpoint that will return inventory information as well as additional JSON node with matrix parent item unique number.
  • Version 6.2.2.278 – February 26, 2019
    • [56852] Added support for billing and shipping account lookup by account details with Invoice-AddInvoice endpoint for S5WebAPI.
  • Version 6.2.2.269 – February 14, 2019
    • [56999] Added pagination to the Inventory, Virtual Inventory, Customer and A/P Bill end points to eliminate calls that exceed the maximum number of records that the S5WebAPISvc can handle.
  • Version 6.2.2.214 – November 30, 2018
    • [56482] Found and solved a problem when the API is passed an invalid Department value.
  • Version 6.2.2.211 - December 27, 2018
    • [56750] Removed the duplicate error from the Free Form information in the WebAPI for Polaris Integration.
  • Version 6.2.2.188 - September 4, 2018
    • [56391] WebAPI: Fixed fields not geting updated in Customer methods.
    • [56404] WebAPI: Fixed errors when calling Insert_Invoice_Lines and Delete_Full_Invoice.
  • Version 6.2.2.183
    • [56351] WebAPI: Fixed fields not getting updated when using the Suppliers_Update call.
    • [56372] WebAPI: Added support for invoice totals, taxes, and amounts paid to invoices created by the WebAPI.
  • Version 6.2.2.182
    • [54843] WebAPI: Added support for the needed fields for the Virtual Inventory WebAPI methods.
  • Version 6.2.2.181
    • [56047] WebAPI: Fixed broken legacy calls, unexposed Put calls, and updated Swagger documentation.
    • [56349] WebAPI: Fixed Get_Superseding_Parts to properly return an array of superseding parts.
  • Version 6.2.2.180
    • [56191] WebAPI: Added the Swagger-Publishing sub folder to the client bin to support the Swagger documentation for the S5WebAPI.
  • Version 6.2.2.179
    • [56335] WebAPI: Port System Five WebAPI service (S5WebAPISvc) to Release.
  • Version 6.2.2.178
    • [56020] WebAPI: Made the WebAPI aware of the data version it is connecting to, only connecting to data version it was compiled with. Swagger documents now show the data version number.
    • [56242] WebAPI: Added support to the Invoice endpoint for Keywords on Invoice Lines.
    • [56268] WebAPI: Added Big Rock Quantity lookup to Part Find.
    • [55003] WebAPI: Solved the problems with the Change_Invoice_Type and Perform_Stock_Adjustment end points.
  • Version 6.2.2.175 - August 08, 2018
    • [56297] WebAPI: Get_Part_Prices call would now acknowledge the set Effective Date.
    • Prior to 6.2.2.175 the Web API has a maximum limit of 32 concurrent connections. This limit has been removed and is now limited by how much available memory (max 4GB as this is a 32 bit service) running the API.
  • Version 6.2.2.172 - July 24, 2018
    • [55894] Web API: Fixed the Get_Customer_By_Email POST method.
  • Version 6.2.2.168
    • [54843] Web API: Added support for the needed fields for the Virtual Inventory Web API methods.
    • [54703] Web API: Fixed the Get_Parts POST method to return the list of linked Free Form Comments.
  • Version 6.2.2.163
    • [55777] WebAPI: The Part Image fetch is now constrained to accept a single part unique at a time. This is required to prevent the API running out of memory trying to build a JSON object that contains 500KB of encoded data for the entire inventory file. It simply is not possible to create a JSON document that large.
  • Version 6.2.2.161
    • [55898] WebAPI: The Customer, Supplier and Invoice List end points have been updated to POST Commands that accept a Body containing the Field and/or Filter items.
  • Version 6.2.2.160
    • [55895] WebAPI: Fixed the Get_Parts POST method to return the list of linked Lookup Words.
    • [55924] WebAPI: Polaris Dealers can now select the System Five Supplier that their Polaris Parts are linked to for the purposes of reporting to the Process Parts Inventory feature of the Polaris integration.
  • Version 6.2.2.154
    • [55313] Cloud WebAPI: Solved blank field issues.
    • [55859] WebAPI: Fixed an access violation error when importing inventory with the S5WebAPI and seasonal highs / lows enabled in System Five.
  • Version 6.2.2.150 - April 26, 2018
    • [55692] Solve the User/Threading issues in the WebAPI.
  • Version 6.2.2.148
    • [54977] The Inventory Value reporting is now exposed through the S5WebAPISvc.

Beta 6.2.7.x History

There can be functionality available in our beta that will not be present in our released product. Typically new enhancement work is completed in this release.

  • Version 6.2.7.396 – October 29, 2019
    • [TFS 20705] Fix for S5WebAPISvc that got broken due to new data collector list load.
  • Version 6.2.7.418 – November 26, 2019
    • [TFS 19490 / BZ 57767] Added Web Comment support to the /addInventory endpoint.
  • Version 6.2.7.414 – November 21, 2019
    • [BZ 57751 / TFS 19694] Corrected the cause of the crashing by preventing the API from returning all of the invoices when the ZERO parameter is passed. The API now returns nothing in that case. Added 2 new methods to address the need to obtain more than one invoice from the API in a single call.
  • Version 6.2.7.396 – October 29, 2019
    • [TFS 20705] Fix for S5WebAPISvc that was broken due to new data collector list load.
  • Version 6.2.7.360 – September 11, 2019
    • [57680] Corrected a problem that prevented the pagination from working correctly in the Inventory End Point with S5WebAPI service.
  • Version 6.2.7.351 – September 6, 2019
    • [57690] Updated the logging to Log Analytics to better report the start and finish of each API call.
  • Version 6.2.7.309 – July 15, 2019
    • [57554] Corrected a problem in the \addInvoice method of the S5WebAPISvc's Invoice end point. In previous versions, the Billing and Shipping information was not correctly setting the Tax Area on the Invoice and in some specific cases, new Customers were not being added to the system.
  • Version 6.2.7.297 – July 4, 2019
    • [57526] S5WebAPISrv - Inventory End Points have been updated to support all of the configured default inventory records and allow for the configuration of prices based on the Price Codes, using Prices, Markups, Margins or Discounts within the bounds of the maximum number of Price Schedules configured in the system. There is no provision to allows the external systems to change the number of Price Schedules.
  • Version 6.2.7.265 – June 6, 2019
    • [57332] Added KitType, Weight, Instock by Dept, SaleStart, SaleEnd, AltSuply, and Barcodes information to the GET /Inventory end point of the S5WebAPI.
  • Version 6.2.7.261 – June 4, 2019
    • [57350] The S5WebAPI /Inventory end point now includes the web comment data.
    • [57267] An e-Commerce filter has been added to the /Inventory end point of the S5WebAPI.
    • [56767] Virtual Warehouse is now considered by the S5WebAPI and the behavior is consistent with System Five.
  • Version 6.2.7.251 – May 28, 2019
    • [57216] Added logging audit to S5WebAPI.
  • Version 6.2.7.248 – May 24, 2019
    • [57425] Added additional logging to the web API when audit is enabled.
  • Version 6.2.7.223 – May 1, 2019
    • [57327] Added “Get_Parts_V2” S5WebAPI endpoint that will return inventory information as well as additional JSON node with matrix parent item unique number.
  • Version 6.2.7.157 – February 28, 2019
    • [56999] Added pagination to the Inventory, Virtual Inventory, Customer and A/P Bill end points to eliminate calls that exceed the maximum number of records that the S5WebAPISvc can handle.
webapi_swagger_documentation.1575405625.txt.gz · Last modified: 2019/12/03 12:40 (4 years ago) by raguilo