2.13 Swagger UI

Swagger is a developer user interface for Retain’s REST API.

This documentation assumes you are a developer and are familiar with REST API.

This allows the developer to get to know the API and experiment with Retain data. See Swagger.io for more details.

NOTE:It is recommended to use Swagger in a development environment.

2.13.1 Prerequisites

The administrator will have access to this but it is recommended to grant a developer more limited rights even to a development environment.

  • The developer must be granted the Assign Rights right, before Swagger will be visible under the Tools Menu.

  • Create a REST Collector Create a REST Collector.

2.13.2 Using Swagger

To being using Swagger, go to the Tools menu, open the REST API section and click on the Swagger link.

The Swagger interface will open in a new tab.

There will be a long list of available calls. Click on a reveal arrow to open a call for more information.

To use an API call press the “Try it out” button.

You will first need to press Authorize and enter a user name and password.

You will then need to provide a REST appKey and appSecret. These can be exported from a REST collector under Server Configuration | REST API.

Then press Execute to run the call.

The result will appear below the curl and Request URL.

2.13.3 Enabling Swagger

Swagger is intended for use by developers. To prevent user access you must first enable swagger in the misc.properties file.

Linux: /opt/beginfinite/retain/RetainServer/WEB-INF\classes\config

Windows: C:\Program Files\Beginfinite\Retain\RetainServer\WEB-INF\classes\config

To enable swagger change its visibility to 1:

tools.swagger.visible=0