Skip to main content

Overview

Locations are used to organize and group Wings nodes by geographic region or data center. Each node must be assigned to a location.

Endpoints

List Locations

curl -X GET "https://panel.example.com/api/admin/locations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
Authentication: Admin with locations:read permission Response:
{
  "data": [
    {
      "id": "location-uuid",
      "short": "us-east",
      "long": "United States - East Coast",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z",
      "nodeCount": 5
    }
  ]
}

Create Location

curl -X POST "https://panel.example.com/api/admin/locations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "short": "eu-west",
    "long": "Europe - Western Region"
  }'
Request Body:
  • short (required): Short identifier (1-60 characters, trimmed)
  • long (optional): Full location name (max 191 characters, trimmed)
Response:
{
  "data": {
    "id": "new-location-uuid",
    "short": "eu-west",
    "long": "Europe - Western Region",
    "createdAt": "2024-01-15T11:00:00Z",
    "updatedAt": "2024-01-15T11:00:00Z"
  }
}

Update Location

curl -X PATCH "https://panel.example.com/api/admin/locations/location-uuid" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "long": "Europe - Western Region (Updated)"
  }'
Request Body: Same as create, but all fields are optional

Delete Location

curl -X DELETE "https://panel.example.com/api/admin/locations/location-uuid" \
  -H "Authorization: Bearer YOUR_API_KEY"
Restrictions: Cannot delete a location that has nodes assigned to it

Location Object

id
string
Location UUID
short
string
Short identifier for the location
long
string
Full descriptive name
createdAt
string
ISO 8601 timestamp
updatedAt
string
ISO 8601 timestamp
nodeCount
integer
Number of nodes in this location (only in list endpoint)

Notes

  • Locations are ordered alphabetically by short name
  • The nodeCount is computed via SQL join in the list endpoint
  • Audit logs are created for all location operations

Build docs developers (and LLMs) love