--- title: "Polarity General REST API - Enable Swagger Docs on Polarity Server v5" slug: "polarity-rest-api" description: "Polarity General's REST API lets you expose and test endpoints via Swagger. Learn how to enable Swagger docs, restart the server, and access the interactive API reference at your Polarity server." tags: ["api-reference", "swagger-docs", "enable-swagger", "polarity-server", "rest-api"] updated: 2025-01-08T19:23:59Z published: 2025-01-08T19:23:59Z canonical: "knowledge.threatconnect.com/polarity-rest-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.threatconnect.com/llms.txt > Use this file to discover all available pages before exploring further. # Polarity's REST API Polarity has been steadily expanding the ways customers can interact with our powerful search product. ## Enabling the Polarity REST API Swagger Docs **The following instructions allow you to enable the Swagger Docs for the Polarity Server’s REST API on Polarity Server/Web 5.4.x/5.4.x and above:** 1. Open the `/app/.env` file for editing. 1. `vi /app/.env` 2. Add the following line to the file: `ENABLE_SWAGGER=true` 3. Save and close the file. 4. Restart the Polarity Server containers. 1. `cd /app && ./down.sh && ./up.sh` ## Access the Polarity REST API Swagger Docs To access the Polarity REST API Swagger Docs: 1. Open a web browser. 2. Navigate to the following URL: `https://<your.polarity.server.url>/api/docs` > [!NOTE] > Note > > Replace `<your.polarity.server.url>` with your Polarity Server’s URL. > [!WARNING] > Please reach out to Support@Polarity.IO with any questions or if you need any support.