Configuring Swagger🔗
Note
Starting with Eocortex version 4.2, the Swagger tool for viewing and executing queries has become available.
By default, browser viewing of the Swagger web interface is not available for the distribution being installed.
To configure the Swagger display, follow these steps:
Configuring on Windows OS🔗
Create a file named DebugParams.xml in a system folder. For example, in the folder C:\Windows\Temp.
Warning
Access to the folder must not be restricted for the user.
Open the DebugParams.xml file and add the following line to enable the Swagger display option:
<DisableWebApiSwagger>false</DisableWebApiSwagger>.
Example of writing to the DebugParams.xml file:
<?xml version="1.0"?> <DebugParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DebugServerParams> <DisableWebApiSwagger>false</DisableWebApiSwagger> </DebugServerParams> </DebugParams>Save the changes.
Move the created file to the C:\Program Files\Eocortex Server folder.
Restart the Eocortex Server application.
Open Swagger at http://host:port/webapi/swagger/index.html.
Configuring on Linux OS🔗
Stop the Eocortex Server application:
sudo systemctl stop eocortex
Create the DebugParams.xml file in the /opt/EocortexServer folder using the command:
sudo touch /opt/EocortexServer/DebugParams.xml
Open the DebugParams.xml file and add the following line to enable the Swagger display option:
<DisableWebApiSwagger>false</DisableWebApiSwagger>.
Example of writing to the DebugParams.xml file:
<?xml version="1.0"?> <DebugParams xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <DebugServerParams> <DisableWebApiSwagger>false</DisableWebApiSwagger> </DebugServerParams> </DebugParams>Save the changes.
Start the Eocortex Server application back:
sudo systemctl start eocortex
Open Swagger at http://host:port/webapi/swagger/index.html.