Origins
Origins are the upstream servers EdgeWrap forwards traffic to. Each project has a primary origin set at creation. You can add more origins to enable failover or load balancing.
Your Primary Origin
The originUrl you set when creating a project is your primary origin. Every proxied request goes here by default. You can update it anytime.
Update your primary origin URL
curl -X PATCH https://server.edgewrap.pro/v1/projects/prj_01jxyz \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{ "originUrl": "https://new-api.yourcompany.com" }'Add Additional Origins
Add multiple origins to enable load balancing or automatic failover. EdgeWrap health-checks all origins and routes around unhealthy ones.
| Param | Type | Description |
|---|---|---|
| name | string | A label for this origin (e.g. 'US East', 'EU Central') |
| url | URL | Full origin URL including https:// |
| isPrimary | boolean | Mark as the new primary origin for the project(default: false) |
| healthCheckPath | string | Path EdgeWrap pings to check origin health (e.g. /health)(default: /) |
Add a failover origin
curl -X POST https://server.edgewrap.pro/v1/projects/prj_01jxyz/origins \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "US West Failover",
"url": "https://us-west.api.yourcompany.com",
"isPrimary": false,
"healthCheckPath": "/health"
}'201Success
{
"success": true,
"data": {
"id": "orig_01jxyz",
"name": "US West Failover",
"url": "https://us-west.api.yourcompany.com",
"isPrimary": false,
"healthCheckPath": "/health",
"healthy": true
}
}Health Checks
EdgeWrap automatically pings each origin's health check path. If an origin returns a non-2xx response or times out, it's marked unhealthy and removed from routing until it recovers.
| State | Meaning |
|---|---|
| healthy | Origin is reachable and returning 2xx on health check path |
| unhealthy | Health check failed — origin excluded from routing until it recovers |
Tip: Set
healthCheckPath to a lightweight endpoint (e.g. /health or /ping) that returns 200 quickly without hitting your database.List Origins
curl https://server.edgewrap.pro/v1/projects/prj_01jxyz/origins \
-H "Authorization: Bearer <your_token>"200Success
{
"success": true,
"data": [
{
"id": "orig_primary",
"name": "Primary",
"url": "https://api.yourcompany.com",
"isPrimary": true,
"healthy": true
},
{
"id": "orig_01jxyz",
"name": "US West Failover",
"url": "https://us-west.api.yourcompany.com",
"isPrimary": false,
"healthy": true
}
]
}Update or Remove an Origin
# Update URL or health check path
curl -X PATCH https://server.edgewrap.pro/v1/projects/prj_01jxyz/origins/orig_01jxyz \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{ "url": "https://us-west-v2.api.yourcompany.com" }'
# Remove origin (must not be in an active load balancer pool)
curl -X DELETE https://server.edgewrap.pro/v1/projects/prj_01jxyz/origins/orig_01jxyz \
-H "Authorization: Bearer <your_token>"Plan Limits
| Plan | Origins per Project |
|---|---|
| Free | 2 |
| Starter | 5 |
| Pro | 10 |
| Team | 25 |
| Enterprise | 999 |