### Run Proxyscotch Server Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Start the Proxyscotch server after building it. Specify the host and token for operation. Example shown for Linux. ```bash $ ./out/-server/server --host=":" --token="" # e.g. on Linux ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/hoppscotch/docs/blob/main/README.md Installs the Mintlify CLI globally. Ensure Node.js version 19 or higher is installed before running this command. ```bash npm i -g mintlify ``` -------------------------------- ### Start Hoppscotch Development Server Source: https://github.com/hoppscotch/docs/blob/main/README.md Starts the local development server for Hoppscotch. A preview will be available at http://localhost:3000. ```bash mintlify dev ``` -------------------------------- ### Install Dependencies for Amazon Linux (AMI) Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Install necessary build tools for Hoppscotch CLI on Amazon Linux (AMI). ```bash sudo yum install gcc72 gcc72-c++ ``` -------------------------------- ### Verify Git Installation Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Check if Git is installed and its version. ```bash git --version ``` -------------------------------- ### Run Proxyscotch Docker Image Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Pull and run the official Proxyscotch Docker image for a quick proxy setup. This command starts a container in detached mode and exposes the necessary port. ```bash docker pull hoppscotch/proxyscotch docker run -d -p 9159:9159 --name proxyscotch hoppscotch/proxyscotch ``` -------------------------------- ### Install Dependencies for Arch Linux Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Install necessary build tools for Hoppscotch CLI on Arch Linux. ```bash sudo pacman -S make gcc python ``` -------------------------------- ### Install Hoppscotch CLI Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Install the Hoppscotch CLI globally using npm after ensuring all pre-requisites are met. ```bash npm i -g @hoppscotch/cli ``` -------------------------------- ### Install Deb Package (Linux) Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/downgrading-and-restoring-backups.mdx Use `sudo dpkg -i` to install a `.deb` package file. This command requires superuser privileges. ```bash sudo dpkg -i hoppscotch-desktop_*.deb ``` -------------------------------- ### GraphQL Query Example Source: https://github.com/hoppscotch/docs/blob/main/documentation/protocols/graphql.mdx This example demonstrates a GraphQL query to fetch specific data, including the 'name' and 'laptops' of a 'Maker' with the name 'Apple'. ```graphql query { maker(name: "Apple") { name laptops { model } } } ``` -------------------------------- ### Install Dependencies for Debian/Ubuntu Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Install necessary build tools for Hoppscotch CLI on Debian or Ubuntu derivatives. ```bash sudo apt-get install python g++ build-essential ``` -------------------------------- ### Install Dependencies for Alpine Linux Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Install necessary build tools for Hoppscotch CLI on Alpine Linux. ```bash sudo apk add python3 make g++ ``` -------------------------------- ### Install Dependencies for RHEL/Fedora Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Install necessary build tools and development libraries for Hoppscotch CLI on RHEL or Fedora derivatives. ```bash sudo dnf install python3 make gcc gcc-c++ zlib-devel brotli-devel openssl-devel libuv-devel ``` -------------------------------- ### Verify Docker Installation Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Check if Docker is installed and its version. ```bash docker -v ``` -------------------------------- ### Verify npm Installation Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Check if npm is installed and its version. ```bash npm -v ``` -------------------------------- ### Run Proxyscotch Server Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Start the Proxyscotch server with custom host and token configurations. Leaving the token blank grants unrestricted access. ```bash # Linux/macOS $ ./out/linux-server/server --host="localhost:9159" --token="" ``` ```bash # Windows $ ./out/windows-server/server.exe --host="localhost:9159" --token="" ``` -------------------------------- ### Verify Node.js Installation Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Check if Node.js is installed and its version. ```bash node -v ``` -------------------------------- ### Verify pnpm Installation Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Check if pnpm is installed and its version. ```bash pnpm -v ``` -------------------------------- ### GraphQL Schema Example Source: https://github.com/hoppscotch/docs/blob/main/documentation/protocols/graphql.mdx This example defines a GraphQL schema with two types, 'Laptop' and 'Maker', illustrating the structure of data that can be queried. ```graphql type Laptop { model: String maker: Maker } type Maker { name: String laptops: [Laptop] } ``` -------------------------------- ### Example API Response Source: https://github.com/hoppscotch/docs/blob/main/documentation/getting-started/rest/request-parameters.mdx This is an example JSON response from an API that has been filtered using query parameters. ```json { "count": 1281, "next": "https://pokeapi.co/api/v2/pokemon?offset=9&limit=3", "previous": "https://pokeapi.co/api/v2/pokemon?offset=3&limit=3", "results": [ { "name": "squirtle", "url": "https://pokeapi.co/api/v2/pokemon/7/" }, { "name": "wartortle", "url": "https://pokeapi.co/api/v2/pokemon/8/" }, { "name": "blastoise", "url": "https://pokeapi.co/api/v2/pokemon/9/" } ] } ``` -------------------------------- ### Start the Observability Stack Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/set-up-opentelemetry-stack-with-docker.mdx Command to launch all services defined in the Docker Compose file in detached mode. ```bash docker-compose up -d ``` -------------------------------- ### Example Request and Response for Mock Route Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/mock.mdx This shows a typical request path and its corresponding JSON response that can be configured as a mock route. ```text GET /users/42 ``` ```json { "id": 42, "name": "Jane Doe", "role": "admin" } ``` -------------------------------- ### Make AppImage Executable and Run (Linux) Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/downgrading-and-restoring-backups.mdx Use `chmod +x` to make the AppImage file executable, then run it directly. This is for installing applications distributed as AppImages on Linux. ```bash chmod +x Hoppscotch-*.AppImage ./Hoppscotch-*.AppImage ``` -------------------------------- ### Example Audit Log Entry Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/audit-logs.mdx This is a concrete example of an audit log entry, illustrating a successful team creation event by an administrator. It shows populated fields for user, group, resource, and status. ```json { "event": "admin.team.create", "timestamp": "2023-08-30 07:03:05", "user": { "id": "cllxa1zqt000gp91zaq6tj93d", "email": "John@hoppscotch.io", "name": "John Doe" }, "group": { "type": "ADMIN", "id": "cllxa1zqt000gp91zaq6tj93d" }, "resource": { "type": "TEAM", "metadata": "{\"id\":\"cllxe4ji4000op91zucsbwazj\",\"name\":\"Fellowship of the Hopp\"}" }, "statusCode": 200, "errorMessage": "", "result": "SUCCESS", "server_version": "2023.4.8" } ``` -------------------------------- ### Example SMTP URL Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Format for a basic SMTP URL for email delivery. ```plaintext smtps://user@domain.com:pass@smtp.domain.com ``` -------------------------------- ### Install NGINX Ingress Controller Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/helm-chart-deployment/digital-ocean.mdx Apply the NGINX Ingress Controller deployment configuration from a GitHub URL to enable external HTTP/S access to your cluster. ```bash kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.2/deploy/static/provider/do/deploy.yaml ``` -------------------------------- ### Run Hoppscotch Individual Service Containers Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/install-and-build.mdx Start the Hoppscotch services by running their respective Docker containers. Ensure your .env file is configured and set a restart policy. ```bash docker run -p 3000:3000 --env-file .env --restart unless-stopped hoppscotch/hoppscotch-frontend docker run -p 3170:3170 --env-file .env --restart unless-stopped hoppscotch/hoppscotch-backend docker run -p 3100:3100 --env-file .env --restart unless-stopped hoppscotch/hoppscotch-admin ``` -------------------------------- ### Deploy Hoppscotch using Helm Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/helm-chart-deployment/digital-ocean.mdx Clone the Hoppscotch Helm charts repository and use Helm to install either the Community or Enterprise edition of Hoppscotch. ```bash git clone https://github.com/hoppscotch/helm-charts.git cd helm-charts helm install community-hoppscotch ./charts/shc helm install enterprise-hoppscotch ./charts/she ``` -------------------------------- ### Pokemon API Response Example Source: https://github.com/hoppscotch/docs/blob/main/documentation/getting-started/rest/creating-a-request.mdx A sample JSON response from the Pokemon API base endpoint, showing available resource URLs. ```json { "ability": "https://pokeapi.co/api/v2/ability/", "berry": "https://pokeapi.co/api/v2/berry/", "pokedex": "https://pokeapi.co/api/v2/pokedex/", "pokemon": "https://pokeapi.co/api/v2/pokemon/", "version-group": "https://pokeapi.co/api/v2/version-group/" } ``` -------------------------------- ### Simple GraphQL Schema Example Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/understanding-graphql.mdx A basic GraphQL schema defining a Query type with a single 'hello' field that returns a String. This illustrates the fundamental structure of a GraphQL schema. ```graphql type Query { hello: String } ``` -------------------------------- ### Build Proxyscotch Desktop Application (Windows) Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Build the desktop tray application for Windows using Git Bash. The compiled binary will be in the 'out/' directory. ```bash ./build.sh windows ``` -------------------------------- ### Build Proxyscotch Desktop Application (Linux) Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Build the desktop tray application for Linux. The compiled binary will be in the 'out/' directory. ```bash ./build.sh linux ``` -------------------------------- ### Hoppscotch CLI Test Examples Source: https://github.com/hoppscotch/docs/blob/main/documentation/clients/cli/overview.mdx Demonstrates various ways to run Hoppscotch collections via the CLI, including specifying environments, delays, access tokens, server URLs, and JUnit reporters. ```bash hopp test kitchen-sink-hoppscotch-collection.json ``` ```bash hopp test -e environment.json kitchen-sink-hoppscotch-collection.json ``` ```bash hopp test -e environment.json -d 1000 kitchen-sink-hoppscotch-collection.json ``` ```bash hopp test clxsntdgh0000lcx9fnits2h8 --token ``` ```bash hopp test -e clxspay2r0006lcx99aqgjbay -d 1000 clxsntdgh0000lcx9fnits2h8 --token --server http://localhost:3170 ``` ```bash hopp test -e environment.json kitchen-sink-hoppscotch-collection.json --reporter-junit kitchen-sink-junit.xml ``` ```bash hopp test kitchen-sink-hoppscotch-collection.json --iteration-count 3 --iteration-data /path/to/iteration-data.csv ``` -------------------------------- ### Build Proxyscotch Server Application (Windows) Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Build the standalone server application for Windows using Git Bash. The compiled binary will be in the 'out/' directory. ```bash ./build.sh windows server ``` -------------------------------- ### Gmail SMTP URL Example Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/prerequisites.mdx Example of an SMTP URL for Gmail. ```plaintext smtps://user@gmail.com:pass@smtp.gmail.com ``` -------------------------------- ### Build Proxyscotch Desktop Application (macOS) Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Build the desktop tray application for macOS. The compiled binary will be in the 'out/' directory. ```bash ./build.sh darwin ``` -------------------------------- ### Connect to MQTT Server URL Source: https://github.com/hoppscotch/docs/blob/main/documentation/getting-started/realtime/mqtt.mdx Enter the MQTT server URL to establish a connection. Ensure the URL starts with a valid protocol like `ws://` or `wss://`. ```text wss://test.mosquitto.org:8081 ``` -------------------------------- ### Build Proxyscotch Server Application (Linux) Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Build the standalone server application for Linux. The compiled binary will be in the 'out/' directory. ```bash ./build.sh linux server ``` -------------------------------- ### Run Docker Container with Entrypoint Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/install-and-build.mdx Starts a Docker container and overrides its entrypoint to 'sh', allowing direct shell access. Ensure the .env file with correct variables is passed. ```bash docker run -it --entrypoint sh --env-file .env ``` -------------------------------- ### Get Response Body as Bytes Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Use `hopp.response.body.bytes()` to get the response body as a `Uint8Array`. This is suitable for handling binary data such as images or files. ```javascript const bytes = hopp.response.body.bytes(); ``` -------------------------------- ### Build Proxyscotch Server Application (macOS) Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/interceptor.mdx Build the standalone server application for macOS. The compiled binary will be in the 'out/' directory. ```bash ./build.sh darwin server ``` -------------------------------- ### Get Response Headers Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the headers of the response. This is a read-only property. ```javascript const headers = hopp.response.headers; ``` -------------------------------- ### Get Request Body Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the body of the request. This is a read-only property. ```javascript const body = hopp.request.body; ``` -------------------------------- ### Get Request Headers Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the headers of the request. This is a read-only property. ```javascript const headers = hopp.request.headers; ``` -------------------------------- ### Enable Desktop App Support with Individual Frontend Container Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/install-and-build.mdx Run the Hoppscotch frontend container with an additional port mapping to enable desktop app support. ```bash docker run -p 3000:3000 -p 3200:3200 --env-file .env --restart unless-stopped hoppscotch/hoppscotch-frontend ``` -------------------------------- ### Run Hoppscotch Enterprise Frontend Service Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/enterprise-edition/install-and-build.mdx Start the Hoppscotch Enterprise frontend service using Docker, mapping port 3000 and using environment variables from a .env file. ```bash docker run -p 3000:3000 --env-file .env --restart unless-stopped hoppscotch/hoppscotch-enterprise-frontend ``` -------------------------------- ### Get Response Time Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the response time in milliseconds. This is a read-only property. ```javascript const time = hopp.response.responseTime; ``` -------------------------------- ### Backup Configuration Directory (macOS/Linux) Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/downgrading-and-restoring-backups.mdx Use the `mv` command to rename your current configuration directory, creating a backup. This is a crucial first step before making changes. ```bash mv ~/Library/Application\ Support/io.hoppscotch.desktop ~/Library/Application\ Support/io.hoppscotch.desktop.backup ``` ```bash mv ~/.config/io.hoppscotch.desktop ~/.config/io.hoppscotch.desktop.backup ``` -------------------------------- ### Get Request Method Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the HTTP method of the request. This is a read-only property. ```javascript const method = hopp.request.method; ``` -------------------------------- ### Get Request URL Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the request URL as a string. This is a read-only property. ```javascript const url = hopp.request.url; ``` -------------------------------- ### Get Response Status Text Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the status text of the response. This is a read-only property. ```javascript const statusText = hopp.response.statusText; ``` -------------------------------- ### Create a Workspace Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/enterprise-edition/admin-dashboard.mdx Create a new workspace within the instance. ```APIDOC ## POST /v1/infra/workspaces ### Description Create a new workspace within the instance. ### Method POST ### Endpoint `/v1/infra/workspaces` ### Request Body (Schema not provided in source) ### Response #### Success Response (200) (Schema not provided in source) ``` -------------------------------- ### Get Request Authentication Configuration Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the authentication configuration of the request. This is a read-only property. ```javascript const auth = hopp.request.auth; ``` -------------------------------- ### Restore Configuration Directory (macOS/Linux) Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/downgrading-and-restoring-backups.mdx Use the `cp -r` command to copy the contents of a backup folder to create a new, active configuration directory. Replace the version number with your specific backup. ```bash cp -r ~/Library/Application\ Support/io.hoppscotch.desktop.backup/backup/backup-by-v25.11.0 ~/Library/Application\ Support/io.hoppscotch.desktop ``` ```bash cp -r ~/.config/io.hoppscotch.desktop.backup/backup/backup-by-v25.11.0 ~/.config/io.hoppscotch.desktop ``` -------------------------------- ### Get Request Query Parameters Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the query parameters of the request. This is a read-only property. ```javascript const params = hopp.request.params; ``` -------------------------------- ### Run Database Migrations Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/install-and-build.mdx Deploys database migrations using Prisma. This command should be run inside the container after accessing its shell. ```bash pnpm exec prisma migrate deploy ``` -------------------------------- ### Configure Environment Variables for Hoppscotch Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/install-and-build.mdx Create a .env file in the project root and populate it with these environment variables. Ensure values are not enclosed in quotes. Key variables include database connection, encryption keys, whitelisted origins, and frontend/backend URLs. ```yaml #-----------------------Backend Config------------------------------# # Prisma Config DATABASE_URL=postgresql://username:password@url:5432/dbname # or replace with your database URL # (Optional) By default, the AIO container (when in subpath access mode) exposes the endpoint on port 80. Use this setting to specify a different port if needed. HOPP_AIO_ALTERNATE_PORT=80 # Sensitive Data Encryption Key while storing in Database (32 character) DATA_ENCRYPTION_KEY=******************************** # Whitelisted origins for the Hoppscotch App. # This list controls which origins can interact with the app through cross-origin comms. # - localhost ports (3170, 3000, 3100): app, backend, development servers and services # - app://localhost_3200: Bundle server origin identifier # NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles, # NOT where the app runs. The app itself uses the `app://` protocol with dynamic # bundle names like `app://{bundle-name}/ WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100,app://localhost_3200,app://hoppscotch #-----------------------Frontend Config------------------------------# # Base URLs VITE_BASE_URL=http://localhost:3000 VITE_SHORTCODE_BASE_URL=http://localhost:3000 VITE_ADMIN_URL=http://localhost:3100 # Backend URLs VITE_BACKEND_GQL_URL=http://localhost:3170/graphql VITE_BACKEND_WS_URL=wss://localhost:3170/graphql VITE_BACKEND_API_URL=http://localhost:3170/v1 # Terms Of Service And Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy # Set to `true` for subpath based access ENABLE_SUBPATH_BASED_ACCESS=false ``` -------------------------------- ### GraphQL Query Response Source: https://github.com/hoppscotch/docs/blob/main/documentation/getting-started/graphql/creating-a-query.mdx Example JSON response for a GraphQL query fetching country data. ```json {\n "data": {\n "countries": [\n {\n "name": "Germany",\n "code": "DE",\n "capital": "Berlin",\n "emoji": "🇩🇪",\n "currencies": [\n "EUR"\n ]\n }\n ]\n }\n} ``` -------------------------------- ### Restore Configuration Directory (Windows Command Prompt) Source: https://github.com/hoppscotch/docs/blob/main/guides/articles/downgrading-and-restoring-backups.mdx Use the `xcopy` command in the Windows Command Prompt to copy a specific backup folder to establish it as the new active configuration. The `/E` flag copies directories and subdirectories, including empty ones, and `/I` assumes the destination is a directory. ```powershell xcopy %APPDATA%\io.hoppscotch.desktop.backup\backup\backup-by-v25.11.0 %APPDATA%\io.hoppscotch.desktop /E /I ``` -------------------------------- ### Environment Variables Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Manage global environment variables, including setting, getting, resetting, and deleting them. ```APIDOC ## `hopp.env.global.delete(key: string)` Deletes a variable from the global environment. ### Method `hopp.env.global.delete` ### Parameters #### Path Parameters - **key** (string) - Required - The key of the variable to delete. ### Example ```javascript hopp.env.global.delete("baseURL"); ``` ``` ```APIDOC ## `hopp.env.global.reset(key: string)` Resets a variable in the global environment to its initial value. ### Method `hopp.env.global.reset` ### Parameters #### Path Parameters - **key** (string) - Required - The key of the variable to reset. ### Example ```javascript hopp.env.global.reset("baseURL"); ``` ``` ```APIDOC ## `hopp.env.global.getInitialRaw(key: string)` Retrieves the initial raw value of a global environment variable. ### Method `hopp.env.global.getInitialRaw` ### Parameters #### Path Parameters - **key** (string) - Required - The key of the variable to retrieve. ### Example ```javascript hopp.env.global.getInitialRaw("baseURL"); ``` ``` ```APIDOC ## `hopp.env.global.setInitial(key: string, value: string)` Sets the initial value of a global environment variable. ### Method `hopp.env.global.setInitial` ### Parameters #### Path Parameters - **key** (string) - Required - The key of the variable to set. - **value** (string) - Required - The initial value for the variable. ### Example ```javascript hopp.env.global.setInitial("baseURL", "https://httpbin.org"); ``` ``` -------------------------------- ### Get Response Status Code Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the HTTP status code of the response. This is a read-only property. ```javascript const status = hopp.response.statusCode; ``` -------------------------------- ### Run Hoppscotch Enterprise Backend Service Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/enterprise-edition/install-and-build.mdx Start the Hoppscotch Enterprise backend service using Docker, mapping port 3170 and using environment variables from a .env file. ```bash docker run -p 3170:3170 --env-file .env --restart unless-stopped hoppscotch/hoppscotch-enterprise-backend ``` -------------------------------- ### Get Environment Variable Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the value of an environment variable. Accepts the variable name as an argument. ```javascript hopp.env.get("variable"); hopp.env.get("baseURL"); ``` -------------------------------- ### Get Workspace Viewers Count Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/enterprise-edition/admin-dashboard.mdx Fetches number of Workspace members with "VIEWER" permissions. ```APIDOC ## GET /v1/infra/workspaces/{id}/viewers-count ### Description Fetches number of Workspace members with "VIEWER" permissions. ### Method GET ### Endpoint `/v1/infra/workspaces/{id}/viewers-count` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the workspace. ### Response #### Success Response (200) (Schema not provided in source) ``` -------------------------------- ### Get Workspace Editors Count Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/enterprise-edition/admin-dashboard.mdx Fetches number of Workspace members with "EDITOR" permissions. ```APIDOC ## GET /v1/infra/workspaces/{id}/editors-count ### Description Fetches number of Workspace members with "EDITOR" permissions. ### Method GET ### Endpoint `/v1/infra/workspaces/{id}/editors-count` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the workspace. ### Response #### Success Response (200) (Schema not provided in source) ``` -------------------------------- ### Get Workspace Owners Count Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/enterprise-edition/admin-dashboard.mdx Fetches number of Workspace members with "OWNER" permissions. ```APIDOC ## GET /v1/infra/workspaces/{id}/owners-count ### Description Fetches number of Workspace members with "OWNER" permissions. ### Method GET ### Endpoint `/v1/infra/workspaces/{id}/owners-count` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the workspace. ### Response #### Success Response (200) (Schema not provided in source) ``` -------------------------------- ### Get Request Variable Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the value of a request variable. Variables are specific to the session unless persisted. ```javascript const value = hopp.request.variables.get("varName"); ``` -------------------------------- ### Run Hoppscotch All-In-One (AIO) Container Source: https://github.com/hoppscotch/docs/blob/main/documentation/self-host/community-edition/install-and-build.mdx Start Hoppscotch using the AIO container, mapping all necessary ports. Ensure your .env file is configured and set a restart policy. ```bash docker run -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env --restart unless-stopped hoppscotch/hoppscotch ``` -------------------------------- ### Get Global Environment Variable Source: https://github.com/hoppscotch/docs/blob/main/documentation/features/scripts.mdx Retrieves the value of a global environment variable. Accepts the variable name. ```javascript hopp.env.global.get("variable"); ```