Base URL and architecture#
The Edge API is served at https://api.edge.network. All requests use REST over HTTPS. Edge does not provide a GraphQL endpoint. Use the REST API for all programmatic access to Compute, CDN and DNS.
For Storage, Edge uses S3-compatible object storage. Storage is accessed via https://storage.edge.network using the AWS S3 API, not the REST API above. See the JavaScript SDK, Python SDK or Go SDK articles for storage integration.
Authentication#
Authenticate with a Bearer token using your API key. Pass it in the Authorization header:
Authorization: Bearer ek_live_xxxxxxxxxxxxxxxxxxxxxxxxAPI keys follow the format ek_live_... for production. Generate keys in Console → Settings → API Keys. Never expose API keys in client-side code or public repositories.
Common headers and response format#
Include Content-Type: application/json for request bodies, and expect application/json in responses.
Successful responses return the requested data directly or wrapped in a standard envelope. For example, a list response:
{
"data": [...],
"meta": {
"total": 42,
"page": 1,
"per_page": 20
}
}Error handling#
Errors return appropriate HTTP status codes (e.g. 400 for bad request, 401 for unauthorised, 404 for not found, 429 for rate limiting) and a JSON body with an error code and message:
{
"error": {
"code": "validation_error",
"message": "Invalid VM configuration"
}
}Handle errors by checking the HTTP status and parsing the error object for retry logic or user-facing messages.
Rate limiting and pagination#
The API is rate limited per account. When you exceed the limit, you receive HTTP 429, with a Retry-After header indicating when to retry. Implement exponential backoff for production clients.
List endpoints support pagination via the page and per_page query parameters.
Resource endpoints#
Compute#
| Method | Path | Action |
|---|---|---|
GET |
/api/compute/vms |
List VMs |
POST |
/api/compute/vms |
Create a VM |
GET |
/api/compute/vms/:id |
Get a VM |
DELETE |
/api/compute/vms/:id |
Delete a VM |
POST |
/api/compute/vms/:id/power |
Power on/off |
CDN#
| Method | Path | Action |
|---|---|---|
GET |
/api/cdn/deployments |
List deployments |
POST |
/api/cdn/deployments |
Create a deployment |
GET |
/api/cdn/deployments/:id/domains |
List domains |
POST |
/api/cdn/deployments/:id/purge |
Purge cache |
DNS#
| Method | Path | Action |
|---|---|---|
GET |
/api/dns/zones |
List zones |
POST |
/api/dns/zones |
Create a zone |
GET |
/api/dns/zones/:id/records |
List records |
POST |
/api/dns/zones/:id/records |
Create a record |
PUT |
/api/dns/zones/:id/records/:recordId |
Update a record |
DELETE |
/api/dns/zones/:id/records/:recordId |
Delete a record |
Storage#
| Method | Path | Action |
|---|---|---|
GET |
/api/storage/buckets |
List buckets |
POST |
/api/storage/buckets |
Create a bucket |
GET |
/api/storage/buckets/:bucket/objects |
List objects |
Presigned URLs are generated via the Storage API or an S3 SDK. For object operations, use the S3-compatible API at https://storage.edge.network with the AWS S3 SDKs.
Example requests#
List VMs#
curl -X GET "https://api.edge.network/api/compute/vms" \
-H "Authorization: Bearer ek_live_xxx"Response:
{
"data": [
{ "id": "vm_123", "name": "web-1", "status": "running" }
],
"meta": { "total": 1, "page": 1, "per_page": 20 }
}Create a CDN deployment#
curl -X POST "https://api.edge.network/api/cdn/deployments" \
-H "Authorization: Bearer ek_live_xxx" \
-H "Content-Type: application/json" \
-d '{"origin": "https://mysite.com", "name": "cdn-prod"}'Response:
{
"id": "cdn_456",
"name": "cdn-prod",
"origin": "https://mysite.com",
"cname": "cdn-456.edge.network"
}Create a DNS record#
curl -X POST "https://api.edge.network/api/dns/zones/zone_789/records" \
-H "Authorization: Bearer ek_live_xxx" \
-H "Content-Type: application/json" \
-d '{"type": "A", "name": "www", "value": "203.0.113.1"}'Response:
{
"id": "rec_abc",
"type": "A",
"name": "www",
"value": "203.0.113.1"
}Keep learning
API & SDKs3 min read
JavaScript SDK
Edge does not provide its own JavaScript SDK. For Storage, use the standard AWS S3 SDK. For Compute, CDN, and DNS, use the REST API with fetch().
API & SDKs3 min read
Python SDK
Edge does not provide its own Python SDK. For Storage, use boto3. For Compute, CDN, and DNS, use the REST API with requests.
API & SDKs3 min read
Go SDK
Edge does not provide its own Go SDK. For Storage, use the AWS SDK for Go v2. For Compute, CDN, and DNS, use the REST API with net/http.