### Quick Start: Development Setup Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Clones the repository, sets up environment variables, generates secrets, and starts the development environment using Docker Compose. Ensure Docker Engine is installed and meets RAM requirements. ```bash git clone https://github.com/yakushstanislav/UltraViolet.git cd UltraViolet/service-env cp .env.example .env mkdir -p secrets openssl rand -hex 32 > secrets/postgres_password openssl rand -hex 32 > secrets/auth_jwt_secret cd .. make dev ``` -------------------------------- ### Local Development Setup Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/README.md Installs project dependencies and starts a local development server with hot-reloading. ```bash npm install npm run dev # http://localhost:5173 ``` -------------------------------- ### Install Dependencies and Start Local Development Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-frontend/README.md Installs project dependencies and starts the Vite development server for local development. Ensure you have Node.js and npm installed. ```bash npm ci npm run dev ``` -------------------------------- ### Frontend Development Setup and Linting Source: https://github.com/yakushstanislav/ultraviolet/blob/master/CONTRIBUTING.md Navigates to the frontend service directory, installs dependencies, and runs linting and formatting checks. This ensures the frontend code adheres to project standards. ```bash cd service-frontend npm ci npm run lint npm run format:check npm run build ``` -------------------------------- ### Post-Install Docker Commands Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/offline-install.md Commands to start the Docker Compose services and verify the installation by checking the readyz endpoint. ```bash docker compose up -d curl -sf http://localhost:8080/readyz ``` -------------------------------- ### First Install Script Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/offline-install.md Executes the initial installation script on the target host after extracting the offline archive. It handles Docker validation, secret generation, image loading, and environment variable setup. ```bash # On a machine with internet scp dist/ultraviolet-v0.1.0-offline.tar.gz user@host:~/Downloads/ # On the target host ssh user@host cd ~/Downloads tar xzf ultraviolet-v0.1.0-offline.tar.gz cd ultraviolet-v0.1.0 # Edit .env: CORS_ALLOWED_ORIGINS, SCAN_ALLOWED_CIDRS, AUTH_BOOTSTRAP_* cp .env.example .env $EDITOR .env ./install.sh ``` -------------------------------- ### Online Installation with Docker Compose Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/getting-started/installation.md Use this method to install UltraViolet by pulling images directly from a registry. Ensure you configure the .env file with production secrets before running the install script. ```bash tar xzf ultraviolet-v0.1.0.tar.gz && cd ultraviolet-v0.1.0 cp .env.example .env # edit .env: POSTGRES_PASSWORD, AUTH_JWT_SECRET, AUTH_BOOTSTRAP_*, CORS, SCAN_ALLOWED_CIDRS ./install.sh # docker compose pull + secret generation docker compose up -d ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Starts the frontend development server using npm. It proxies API requests to the backend. ```bash cd service-frontend && npm run dev (Vite proxies /api → :8080, /realtime → :8081) ``` -------------------------------- ### Backend Hooks Setup Source: https://github.com/yakushstanislav/ultraviolet/blob/master/CONTRIBUTING.md Installs pre-commit hooks for the backend service. This ensures code quality and consistency before committing changes. ```bash cd service-api && make setup ``` -------------------------------- ### Install Ultraviolet (Online) Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Installs Ultraviolet using an online archive. Extracts the archive, copies the environment file, and runs the install script. ```bash # from the build machine scp dist/ultraviolet-v0.1.0-offline.tar.gz user@host:~/ # on the server (Docker ≥ 24, amd64) tar xzf ultraviolet-v0.1.0-offline.tar.gz && cd ultraviolet-v0.1.0 cp .env.example .env ./install.sh ``` -------------------------------- ### Run Development Documentation Server Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Starts a local development server for the project's documentation. Accessible at http://localhost:5173. ```bash make docs-dev # → http://localhost:5173 ``` -------------------------------- ### Offline Installation with Docker Compose Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/getting-started/installation.md This method is for environments without direct registry access. It uses a pre-bundled archive containing all necessary Docker images. Configure the .env file and run the install script. ```bash tar xzf ultraviolet-v0.1.0-offline.tar.gz && cd ultraviolet-v0.1.0 cp .env.example .env # edit secrets, CORS, scan policy ./install.sh # detects images/ and runs docker load, skips pull docker compose up -d ``` -------------------------------- ### Start Docker Compose Services Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/docker-compose.md Command to start all services defined in the docker-compose.yml files in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Docker Compose with Docs Profile Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/README.md Starts the documentation service along with other services using a specific Docker Compose profile. ```bash cd ../service-env docker compose --profile docs up -d uv-documentation # → http://localhost:3001 ``` -------------------------------- ### API Me Endpoint Response Example Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/getting-started/first-login.md Example response from the /v1/me endpoint, showing the authenticated user's role and ID. ```json # { "role": "admin", "user_id": 1 } ``` -------------------------------- ### API Authentication Response Example Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/getting-started/first-login.md Example JSON response from the API login endpoint, containing access token, refresh token, and their expiration times. ```json # { # "access_token": "eyJhbGciOi...", # "refresh_token": "rt_8f3c...", # "access_expires_at": "2026-05-18T10:30:00Z", # "refresh_expires_at": "2026-05-25T10:15:00Z" # } ``` -------------------------------- ### Activate Observability Profile Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/observability.md Starts the Prometheus and Grafana stack using Docker Compose. Ensure you are in the 'service-env' directory before running. ```bash cd service-env docker compose --profile observability up -d ``` -------------------------------- ### Run Full Development Environment with Docker Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Starts the full development environment using Docker Compose, including hot-rebuilding capabilities. ```bash make dev # compose prod + dev override, hot-rebuild ``` -------------------------------- ### Install Git Hooks Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-frontend/README.md Sets up the Git hooks for the project using husky and lint-staged. This ensures that code quality checks are performed before commits. ```bash npm run prepare ``` -------------------------------- ### Set Up Git Hooks for UltraViolet API Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-api/README.md Installs Git pre-commit hooks that run Go formatting and linting tools on staged files. ```bash make setup ``` -------------------------------- ### Demo Mode Restrictions Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/admin/users.md Lists endpoints that are blocked when the instance is started with APP_DEMO_MODE=true. These actions return a 403 error. ```bash POST /v1/users 403 {"error":"demo_mode_restricted"} ``` ```bash PATCH /v1/users/{id}/password 403 {"error":"demo_mode_restricted"} ``` ```bash DELETE /v1/users/{id} 403 {"error":"demo_mode_restricted"} ``` -------------------------------- ### Bootstrap Credentials Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/getting-started/first-login.md These environment variables define the username, password, and role for the initial bootstrap user. Ensure these are set before the first start. ```bash AUTH_BOOTSTRAP_USERNAME=admin AUTH_BOOTSTRAP_PASSWORD=admin AUTH_BOOTSTRAP_ROLE=admin ``` -------------------------------- ### Build Release Archives Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/offline-install.md Builds release archives for offline installation. Use DRY_RUN=1 for offline-only builds without pushing or tag checks. ```bash git tag v0.1.0 make release VERSION=v0.1.0 # builds + pushes + writes archives to dist/ DRY_RUN=1 make release VERSION=v0.1.0 # offline-only, no push, no tag check ``` -------------------------------- ### User List Response Structure Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/admin/users.md Example JSON response structure for listing users, including user details and total count. ```json { "users": [ { "id": 1, "username": "admin", "role": "admin", "is_active": true, "last_login_at": "2026-05-17T08:00:00Z", "created_at": "2026-01-04T10:11:22Z" }, … ], "total": 12 } ``` -------------------------------- ### Development Installation from Source Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/getting-started/installation.md Set up UltraViolet for development by cloning the repository and building images from source. This method requires generating secrets and using a specific make command. ```bash git clone https://github.com//UltraViolet.git cd UltraViolet cp service-env/.env.example service-env/.env openssl rand -hex 32 > service-env/secrets/postgres_password openssl rand -hex 32 > service-env/secrets/auth_jwt_secret make dev ``` -------------------------------- ### Documentation Site Development Preview Source: https://github.com/yakushstanislav/ultraviolet/blob/master/CONTRIBUTING.md Starts a local development server for the documentation site, allowing for live preview of changes. This is useful for iterating on documentation content. ```bash make docs-dev ``` -------------------------------- ### Copying Secrets Template Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-env/secrets.template/README.md Copy the template secrets directory to the active secrets directory. This is useful for initial setup or when starting with a fresh configuration. ```bash cp -r secrets.template secrets # then replace file contents with your own values ``` -------------------------------- ### Request Host Risk History Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/risk-explain.md Example HTTP GET request to retrieve the historical risk timeline for a specific host. Parameters like 'days' and 'limit' can be used to filter the results. ```http GET /v1/hosts/203.0.113.45/risk-history?days=30&limit=1000 ``` -------------------------------- ### Build Project Components Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Builds the project components, including the main application, linting, frontend, and documentation. ```bash make build && make lint && make frontend-build && make docs-build ``` -------------------------------- ### Run Development Environment with Hybrid Mode (Backend Focus) Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Sets up a hybrid development mode for faster backend iteration, including PostgreSQL setup and API build. ```bash make dev-db # PostgreSQL only on :5432 cd service-api && make build export LOGGER_NAME=uv-api LOGGER_DEBUG=true export SERVER_ADDR=0.0.0.0 SERVER_PORT=8080 export METRICS_ADDR=0.0.0.0 METRICS_PORT=9090 export REALTIME_ADDR=0.0.0.0 REALTIME_PORT=8081 export POSTGRES_ADDR=localhost POSTGRES_PORT=5432 export POSTGRES_USERNAME=ultraviolet export POSTGRES_PASSWORD="$(cat ../service-env/secrets/postgres_password)" export POSTGRES_DATABASE=ultraviolet export POSTGRES_SCHEMA_PATH="$(pwd)/deploy/migrations" export AUTH_JWT_SECRET="$(cat ../service-env/secrets/auth_jwt_secret)" ./bin/uv-api ``` -------------------------------- ### Verify ffmpeg Installation Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/troubleshooting.md Check if ffmpeg is installed within the 'uv-api' container. This is necessary for generating RTSP snapshots. ```bash docker compose exec uv-api ffmpeg -version ``` -------------------------------- ### Production Build and Preview Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/README.md Builds the static assets for production and serves them locally for preview. ```bash npm run build # outputs to docs/.vitepress/dist npm run preview # serve dist/ locally on http://localhost:4173 ``` -------------------------------- ### Technology Detection Example Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/probes/http-and-tls.md This JSON object shows examples of detected technologies and their versions, derived from HTTP probe analysis. ```json { "Nginx": {"version": "1.25.3"}, "WordPress": {"version": "6.4.3"}, "Cloudflare": {}, "PHP": {"version": "8.2.10"} } ``` -------------------------------- ### Full Stack Development Setup with Docker Source: https://github.com/yakushstanislav/ultraviolet/blob/master/CONTRIBUTING.md Sets up the development environment using Docker, including copying environment variables and generating secrets. This is the recommended method for full-stack development. ```bash cd service-env cp .env.example .env mkdir -p secrets openssl rand -hex 32 > secrets/postgres_password openssl rand -hex 32 > secrets/auth_jwt_secret cd .. make dev ``` -------------------------------- ### Nginx TLS Termination Configuration Example Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Example Nginx configuration for TLS termination, used as a reverse proxy for Ultraviolet. ```yaml # docker-compose.override.yml services: service-frontend: ports: - "127.0.0.1:3000:8080" ``` -------------------------------- ### Take a PostgreSQL Backup Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/backup-restore.md Navigate to the service environment directory and execute the backup script to create a PostgreSQL dump. The backup file is stored in the 'backups/' directory with a timestamped name. ```bash cd service-env ./scripts/backup.sh # → backups/uv-2026-05-19T12-00-00Z.dump ``` -------------------------------- ### Docker Build and Upload Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/README.md Builds the Docker image for the documentation site and uploads it to a registry. ```bash make docker # build uv-documentation: make upload # push :short-sha and :latest to UV_REGISTRY ``` -------------------------------- ### GET /v1/dashboard/top Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/dashboard/index.md Retrieves data for top ports, protocols, and risk factors. ```APIDOC ## GET /v1/dashboard/top ### Description Retrieves data for top ports, protocols, and risk factors. ### Method GET ### Endpoint /v1/dashboard/top ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return for each category. Server-side limit is 50. #### Request Body None ### Request Example ```bash curl -s -H "authorization: bearer $TOKEN" \ "http://localhost:8080/v1/dashboard/top?limit=10" | jq ``` ### Response #### Success Response (200) - **top_ports** (array) - List of top ports and their counts. - **top_protocols** (array) - List of top protocols and their counts. - **top_risk** (array) - List of top risk factors and their counts. #### Response Example ```json { "top_ports": [ { "port": 443, "count": 8421 }, … ], "top_protocols": [ { "protocol": "https", "count": 8230 }, … ], "top_risk": [ { "factor": "outdated_version", "count": 1812 }, … ] } ``` ``` -------------------------------- ### Build the Project for Production Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-frontend/README.md Compiles and bundles the frontend application for production deployment. This command generates optimized static assets. ```bash npm run build ``` -------------------------------- ### Configuring HTTP Probe Backend Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/probes/overview.md Choose the HTTP client backend for probes. 'native' offers higher fidelity, while 'stdlib' falls back to Go's standard client, useful for bypassing WAFs that detect non-standard clients. ```bash PROBE_BACKEND=native ``` ```bash PROBE_BACKEND=stdlib ``` -------------------------------- ### Get Current User Endpoint Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/authentication.md Retrieves information about the currently authenticated user. ```APIDOC ## GET /v1/me ### Description Returns basic information about the currently authenticated user. ### Method GET ### Endpoint http://localhost:8080/v1/me ### Parameters #### Request Headers - **authorization** (string) - Required - Bearer token for authentication (e.g., "bearer "). ### Response #### Success Response (200) - **role** (string) - The user's role. - **user_id** (integer) - The user's unique identifier. #### Response Example ```json { "role": "operator", "user_id": 2 } ``` ### Errors - **401**: Authentication failed. ``` -------------------------------- ### GET /v1/dashboard/map Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/dashboard/index.md Retrieves country-specific service count data for the world map visualization. ```APIDOC ## GET /v1/dashboard/map ### Description Retrieves country-specific service count data for the world map visualization. ### Method GET ### Endpoint /v1/dashboard/map ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -s -H "authorization: bearer $TOKEN" \ "http://localhost:8080/v1/dashboard/map" | jq ``` ### Response #### Success Response (200) - **countries** (array) - An array of objects, where each object contains country code, host count, service count, latitude, and longitude. #### Response Example ```json { "countries": [ { "country_code": "NL", "host_count": 1241, "service_count": 4280, "latitude": 52.13, "longitude": 5.29 }, { "country_code": "DE", "host_count": 980, "service_count": 3110, "latitude": 51.16, "longitude": 10.45 }, ... ] } ``` ``` -------------------------------- ### GET /v1/alerts/events Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Lists all alert events. This endpoint retrieves a list of all recorded alert events. ```APIDOC ## GET /v1/alerts/events ### Description List events. ### Method GET ### Endpoint /v1/alerts/events ``` -------------------------------- ### Build UltraViolet API Locally Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-api/README.md Use this command to build the UltraViolet API service binaries on your local machine. ```bash make build ``` -------------------------------- ### Get Scan Schedule Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Retrieves details of a specific scan schedule. Requires viewer role. ```APIDOC ## GET /v1/scan-schedules/{id} ### Description Read. ### Method GET ### Endpoint /v1/scan-schedules/{id} ``` -------------------------------- ### Example Search Query Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/search/overview.md Demonstrates how to perform a search query using curl, specifying filters for port and country, a free-text query, and a limit for the results. The output is piped to jq for pretty-printing. ```bash curl -s -H "authorization: bearer $TOKEN" \ "http://localhost:8080/v1/search?port=443&country=NL&q=nginx&limit=50" | jq ``` -------------------------------- ### Configure Frontend for Sub-path Deployment Source: https://github.com/yakushstanislav/ultraviolet/blob/master/README.md Builds the frontend application with a specified base path, suitable for deploying Ultraviolet under a sub-path (e.g., /ultraviolet/). ```bash VITE_BASE_PATH=/ultraviolet/ make frontend-build ``` -------------------------------- ### Get Scan Delta Events Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Retrieves per-scan delta events. Requires viewer role. ```APIDOC ## GET /v1/scans/{id}/delta/events ### Description Per-scan delta events. ### Method GET ### Endpoint /v1/scans/{id}/delta/events ``` -------------------------------- ### Get Scan Delta Summary Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Retrieves a per-scan delta summary. Requires viewer role. ```APIDOC ## GET /v1/scans/{id}/delta ### Description Per-scan delta summary. ### Method GET ### Endpoint /v1/scans/{id}/delta ``` -------------------------------- ### GET /v1/hosts/{ip}/risk-recommendations Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Retrieves read-only remediation recommendations for a host. These recommendations are regenerated on each scan. ```APIDOC ## GET /v1/hosts/{ip}/risk-recommendations ### Description Read-only remediation recommendations for the host (regenerated on each scan). See [Remediation](../admin/remediation.md). ### Method GET ### Endpoint /v1/hosts/{ip}/risk-recommendations ``` -------------------------------- ### Run Go Formatting and Linting Tools Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-api/docs/backend-style-standard.md Execute these commands within the service-api directory to format code, check for style issues, and ensure compliance with linting rules. ```bash gofmt -w ./... gofumpt -w . goimports -w -local github.com/yakushstanislav/UltraViolet . golangci-lint run ./... ``` -------------------------------- ### GET /v1/users Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Lists all users. This endpoint retrieves a list of all users in the system, intended for administrative use. ```APIDOC ## GET /v1/users ### Description List users. ### Method GET ### Endpoint /v1/users ``` -------------------------------- ### Get Host Timeline Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/hosts/host-details.md Retrieves the timeline of events for a specific host. This endpoint is accessible to any authenticated role. ```APIDOC ## GET /v1/timeline ### Description Retrieves the timeline of events associated with a specific host. This endpoint is accessible to any authenticated role. ### Method GET ### Endpoint /v1/timeline ``` -------------------------------- ### GET /v1/dashboard/scans/summary Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/dashboard/index.md Retrieves a summary of the latest scans, including counts by status and a list of recent scans. ```APIDOC ## GET /v1/dashboard/scans/summary ### Description Retrieves a summary of the latest scans, including counts by status and a list of recent scans. ### Method GET ### Endpoint /v1/dashboard/scans/summary ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl -s -H "authorization: bearer $TOKEN" \ "http://localhost:8080/v1/dashboard/scans/summary" | jq ``` ### Response #### Success Response (200) - **by_status** (object) - Contains counts of scans for each status (PENDING, RUNNING, DONE, FAILED, CANCELED). - **latest** (array) - A list of the most recent scans. #### Response Example ```json { "by_status": { "PENDING": 2, "RUNNING": 1, "DONE": 303, "FAILED": 4, "CANCELED": 2 }, "latest": [ … ] } ``` ``` -------------------------------- ### Configuring UV_BASE_PATH for Sub-path Deployment Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/deployment/reverse-proxy.md This example shows how to set the `UV_BASE_PATH` and `VITE_BASE_PATH` environment variables in a `.env` file to deploy UltraViolet under a specific sub-path, such as `/ultraviolet/`. ```bash # .env UV_BASE_PATH=/ultraviolet/ # Frontend build VITE_BASE_PATH=/ultraviolet/ ``` -------------------------------- ### Get User Info Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Retrieves the caller's role and user ID. Requires viewer role. ```APIDOC ## GET /v1/me ### Description {role, user_id}. ### Method GET ### Endpoint /v1/me ``` -------------------------------- ### Recreate Stack (Clean Slate) Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/troubleshooting.md Perform a complete stack recreation by downing the services and removing associated volumes (including the database), then reinstalling. This is for a true clean slate. ```bash docker compose down -v # drops postgres-data ./install.sh # fresh secrets + first start ``` -------------------------------- ### Query Parsing Examples Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/search/overview.md Shows how different inputs to the combined search bar are parsed into key-value pairs and free-text queries. Demonstrates handling of quoted phrases for substring matching. ```text Search bar | Parsed |---|---| | `port:443 nginx` | `port=443`, `q=nginx` | | `country:NL ssh root@` | `country=NL`, `q="ssh root@"` | | `protocol:rtsp` | `protocol=rtsp` | | `cve:CVE-2023-44487 risk_gte:80` | `cve=CVE-2023-44487`, `risk_gte=80` | | `body:"Welcome to nginx"` | `body=Welcome to nginx` | ``` -------------------------------- ### GET /v1/audit Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Queries the audit log. This administrative endpoint allows for searching and retrieving audit trail records. ```APIDOC ## GET /v1/audit ### Description Query the audit log. ### Method GET ### Endpoint /v1/audit ``` -------------------------------- ### Build Documentation Source: https://github.com/yakushstanislav/ultraviolet/blob/master/CONTRIBUTING.md Builds the project documentation. This command is used to ensure that all documentation changes are correctly generated and to verify documentation integrity. ```bash make docs-build ``` -------------------------------- ### GET /v1/users/{id} Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Retrieves details for a specific user. This endpoint allows fetching information about a user by their ID. ```APIDOC ## GET /v1/users/{id} ### Description Read user. ### Method GET ### Endpoint /v1/users/{id} ``` -------------------------------- ### Get Related Hosts Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/hosts/host-details.md Retrieves a list of hosts related to the specified host. This endpoint is accessible to any authenticated role. ```APIDOC ## GET /v1/related ### Description Retrieves a list of hosts that are related to the current host context. This endpoint is accessible to any authenticated role. ### Method GET ### Endpoint /v1/related ``` -------------------------------- ### Check Database Migration Logs Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/troubleshooting.md Use this command to view logs related to database migrations when the 'readyz' endpoint returns a 503 error with the status 'database: migrating'. This helps identify if a migration crashed mid-flight. ```bash docker compose logs uv-api | grep migrate ``` -------------------------------- ### GET /v1/alerts Source: https://github.com/yakushstanislav/ultraviolet/blob/master/service-documentation-frontend/docs/api/endpoints.md Lists all alert rules with pagination. This endpoint retrieves a paginated list of existing alert rules. ```APIDOC ## GET /v1/alerts ### Description List rules (paginated). ### Method GET ### Endpoint /v1/alerts ```