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 on premise 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 endpoints 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.
Edit

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:

Edit

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

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.

Edit

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 are the Swagger 2.0 documentation, after copying the response text and saving it into a text file using your preferred Swagger editor (we suggest editor.swagger.io) to view the Swagger documentation.

You can also turn on “Enable Swagger Publishing” in your S5WebAPISvc.ini and which will be located in the bin folder of the System Five application. You will then be able to interact with the Swagger 2.0 documentation and the Web API through a browser, without using Postman or a Swagger editor.

Edit

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.
You will need to click the Authorize button and enter correct credentials to avoid a 401 Unauthorized response.
Edit

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

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

Edit

Samples

Sending blank strings for data fields could wipe out the values that exist in the database and unintentionally cause problems. Only send data that you actually want the receiving API to process.
Edit

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 common to have a training and production WebAPI configured when testing new features. Assuming the API is running and you are authenticated, you can access the application 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"}]}