Servers
What are Servers?
Servers define the base URLs for your API. A project can have multiple servers to represent different deployment environments or API versions.
Servers are different from environments. Environments hold variables, while servers define where your API is hosted.
Example Server Configuration
A typical project might have these servers:
Managing Servers
Open Project Menu
Click the three-dot menu (⋮) next to the project name.
Select "Servers"
Click the "Servers" option in the dropdown.
Servers Modal Opens
A modal appears where you can add, edit, or remove server URLs.
Servers Modal
• Type a URL and press Enter or click + to add
• Click ✕ next to a URL to remove it
• Click Save to apply changes
Servers vs Environments
Understanding the difference:
Servers
- •Define base URLs
- •Where your API is hosted
- •Static values
- •Used for documentation/OpenAPI
Environments
- •Define variables
- •Key-value pairs
- •Dynamic substitution
- •Used in requests
Best Practice
Define your servers for documentation purposes, but use environment variables like {{baseUrl}} in your actual requests. This gives you the flexibility of environments with the documentation benefit of servers.
When to Use Servers
API Documentation
When exporting your project as OpenAPI, servers are included in the spec. This tells API consumers where they can access your API.
Multiple API Versions
If your API has multiple versions with different base URLs (e.g., /v1, /v2), you can define them as separate servers.
Regional Endpoints
APIs with regional deployments (US, EU, APAC) can list all regions as different servers.