Getting Detailed API Documentation
Web API provides a Swagger interface. Swagger provides a documentation page for each mapped REST API, declaring its HTTP method, content-type and input file when applicable (JSON, XML, binary, etc.). This guide explains how to reach Swagger page and get the details of an API.
To get access to the Swagger page, follow these steps:
-
Ensure that Web API service is up and running. Open Workbench, right-click on your project and select Configure Services.
-
If Web API service is stopped, click at the button in the first column to start it.
-
Check the Status column or the ensure the icon has a green light.
-
Go to http://localhost/fwxapi/swagger/index.html. You can use either HTTP or HTTPS. If your Web API Service is running on a different server, replace localhost with your server name or IP address.
Through this page, you have access to the documentation of all endpoints provided by Web API.
In the example below, the following fields are available:
- HTTP method: usually one of the following values GET, POST, PUT, DELETE; in this case GET
- HTTP endpoint: the path to access the managed resource; in this case /fwxapi/webhook/v1/Basic/
- API description
- Parameters: one or more parameters used in the request. For HTTP GET, it is usually a URL query string, for POST, PUT, DELETE, it is usually the content of a JSON or XML
- Response code and its description: a pair of values, describing if the request was successful or not and why