VPS.org API

REST API 文件

位置 API

Retrieve information about available datacenter locations for VPS deployment.

终点 1 endpoint
基本路径 /api/v1/locations
得到 /api/v1/locations/

列出所有地点

获取所有可用数据中心位置的清单, 以便您在其中部署 VPS 服务器 。

查询参数

参数 类型 必需的 说明说明
region string 否 无 Filter by region: north-america, europe, asia, oceania
available boolean 否 无 Show only locations currently accepting new servers

示例请求

cURL
Python
JavaScript
PHP
curl -X GET "https://admin.vps.org/api/v1/locations/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
import requests

url = "https://admin.vps.org/api/v1/locations/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/locations/', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  }
});

const locations = await response.json();
console.log(locations);
$ch = curl_init('https://admin.vps.org/api/v1/locations/');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer YOUR_API_TOKEN',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$locations = json_decode($response, true);
curl_close($ch);

示例回复

{
  "count": 8,
  "results": [
    {
      "id": 1,
      "name": "New York",
      "slug": "ny-usa",
      "country": "United States",
      "country_code": "US",
      "city": "New York",
      "region": "north-america",
      "continent": "North America",
      "available": true,
      "latitude": 40.7128,
      "longitude": -74.0060,
      "network_provider": "Digital Realty",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "Low Latency to US East Coast"
      ],
      "average_latency_ms": {
        "us-east": 2,
        "us-west": 75,
        "europe": 85,
        "asia": 220
      }
    },
    {
      "id": 2,
      "name": "San Francisco",
      "slug": "sf-usa",
      "country": "United States",
      "country_code": "US",
      "city": "San Francisco",
      "region": "north-america",
      "continent": "North America",
      "available": true,
      "latitude": 37.7749,
      "longitude": -122.4194,
      "network_provider": "Equinix",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "Low Latency to US West Coast & Asia"
      ],
      "average_latency_ms": {
        "us-east": 75,
        "us-west": 2,
        "europe": 150,
        "asia": 120
      }
    },
    {
      "id": 3,
      "name": "London",
      "slug": "lon-uk",
      "country": "United Kingdom",
      "country_code": "GB",
      "city": "London",
      "region": "europe",
      "continent": "Europe",
      "available": true,
      "latitude": 51.5074,
      "longitude": -0.1278,
      "network_provider": "Telehouse",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "GDPR Compliant",
        "Low Latency to Europe"
      ],
      "average_latency_ms": {
        "us-east": 85,
        "us-west": 150,
        "europe": 5,
        "asia": 180
      }
    },
    {
      "id": 4,
      "name": "Frankfurt",
      "slug": "fra-de",
      "country": "Germany",
      "country_code": "DE",
      "city": "Frankfurt",
      "region": "europe",
      "continent": "Europe",
      "available": true,
      "latitude": 50.1109,
      "longitude": 8.6821,
      "network_provider": "Interxion",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "GDPR Compliant",
        "Central European Location"
      ],
      "average_latency_ms": {
        "us-east": 95,
        "us-west": 160,
        "europe": 3,
        "asia": 200
      }
    },
    {
      "id": 5,
      "name": "Singapore",
      "slug": "sgp-sg",
      "country": "Singapore",
      "country_code": "SG",
      "city": "Singapore",
      "region": "asia",
      "continent": "Asia",
      "available": true,
      "latitude": 1.3521,
      "longitude": 103.8198,
      "network_provider": "Equinix",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "Low Latency to Asia Pacific"
      ],
      "average_latency_ms": {
        "us-east": 250,
        "us-west": 180,
        "europe": 170,
        "asia": 5
      }
    },
    {
      "id": 6,
      "name": "Tokyo",
      "slug": "tok-jp",
      "country": "Japan",
      "country_code": "JP",
      "city": "Tokyo",
      "region": "asia",
      "continent": "Asia",
      "available": true,
      "latitude": 35.6762,
      "longitude": 139.6503,
      "network_provider": "Equinix",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "Low Latency to East Asia"
      ],
      "average_latency_ms": {
        "us-east": 180,
        "us-west": 120,
        "europe": 240,
        "asia": 8
      }
    },
    {
      "id": 7,
      "name": "Sydney",
      "slug": "syd-au",
      "country": "Australia",
      "country_code": "AU",
      "city": "Sydney",
      "region": "oceania",
      "continent": "Oceania",
      "available": true,
      "latitude": -33.8688,
      "longitude": 151.2093,
      "network_provider": "NextDC",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "Low Latency to Australia & New Zealand"
      ],
      "average_latency_ms": {
        "us-east": 210,
        "us-west": 140,
        "europe": 280,
        "asia": 120
      }
    },
    {
      "id": 8,
      "name": "Toronto",
      "slug": "tor-ca",
      "country": "Canada",
      "country_code": "CA",
      "city": "Toronto",
      "region": "north-america",
      "continent": "North America",
      "available": true,
      "latitude": 43.6532,
      "longitude": -79.3832,
      "network_provider": "Cologix",
      "features": [
        "100% Uptime SLA",
        "DDoS Protection",
        "IPv6 Support",
        "Private Networking",
        "Data Sovereignty (Canada)"
      ],
      "average_latency_ms": {
        "us-east": 20,
        "us-west": 65,
        "europe": 90,
        "asia": 210
      }
    }
  ]
}

响应字段

外地 类型 说明说明
id integer Unique location identifier
name string Human-readable location name
slug string URL-friendly location identifier
country string Country name
country_code string ISO 3166-1 alpha-2 country code
city string City name
region string Geographic region (north-america, europe, asia, oceania)
continent string Continent name
available boolean Whether location is accepting new servers
latitude decimal Geographic latitude
longitude decimal Geographic longitude
network_provider string Datacenter/network provider name
features array List of location-specific features
average_latency_ms object Average latency in milliseconds to major regions

响应状态码

200 已成功检索位置列表
401 未授权 - 身份验证令牌无效或缺失

Choosing the Right Location

目标受众

Target Audience Recommended Locations Why
US East Coast Users New York, Toronto Lowest latency (2-20ms), close proximity
US West Coast Users San Francisco Lowest latency (2ms), silicon valley connectivity
European Users London, Frankfurt GDPR compliant, low latency (3-5ms) across Europe
Asian Users Singapore, Tokyo Best connectivity to Asia Pacific region (5-8ms)
Australian/NZ Users Sydney Only Oceania location, lowest latency to Australia
Global Audience Multiple locations with load balancing Deploy in 2-3 regions for global coverage

按遵守要求分列

网络绩效

最低至主要市场
  • 北美: 纽约(向东美国两米)、旧金山(向西美国两米)
  • 欧洲: 法兰克福(3米),伦敦(5米)
  • 亚洲: 新加坡(5米)、东京(8米)
  • 大洋洲: 悉尼(唯一选项)
《最佳全球分销最佳全球分销》
  1. 小学: 纽约或旧金山(最大用户基础)
  2. 中等教育: 伦敦或法兰克福(欧洲覆盖面)
  3. 高等教育: 新加坡或东京(亚洲覆盖面)
Pro Tip : 对于特派团关键应用程序,应部署到多个地点,在最大时段和地域冗余方面自动出现故障。

数据中心基础设施

标准特征( 所有位置)

  • ✓ 第三级或更高级数据中心
  • ✓ 100%恢复时间 SLS
  • ✓ 冗余功率( N+1 或 2N)
  • ✓ 冗余制冷
  • ✓ 24/7/24/7人身安全
  • ✓ 生物测量访问控制
  • ✓ DDoS保护(最多减少10个Tbps)
  • ✓ IPv4 和 IPv6 支持
  • ✓ 私营网络(VLAN)
  • ✓ 10 Gbps+网络主干网
  • ✓ 多重上游提供者
  • ✓ BGP 与主要网络的对等

网络提供者

地点地点地点地点地点 提供者 级别 Notes
New York Digital Realty Tier III Major internet exchange point
San Francisco Equinix Tier III Silicon Valley connectivity hub
London Telehouse Tier III LINX (London Internet Exchange)
Frankfurt Interxion Tier III DE-CIX (world's largest IXP)
Singapore Equinix Tier III Asia Pacific connectivity hub
Tokyo Equinix Tier III JPIX and JPNAP peering
Sydney NextDC Tier III Oceania's largest datacenter
Toronto Cologix Tier III Canadian data sovereignty

Location Migration & Multi-Region Deployment

位置间移动

您可以使用快照将您的 VPS 迁移到不同地点:

  1. 创建您现有 VPS 的快照
  2. 在目标位置新建 VPS
  3. 还原新 VPS 的快照
  4. 更新 DNS 记录以指向新的 IP
  5. 一旦移民身份得到核实,即删除旧的 VPS
注: 迁移到新地点将产生新的IP地址。 DNS 传播时间计划(通常为全全球传播24至48小时)。

多种职业部署

为了高可用性和全球覆盖面,考虑在多个地点部署:

使用案例
  • 全球内容交付情况
  • 地理负载平衡
  • 灾后恢复
  • 遵守数据居住法
  • 减少国际用户的延迟时间
执行 执行 执行
  • 基于 DNS 的负负平衡(GeoDNS)
  • CCDN 集成(Cloudflare等)
  • 跨区域复制数据库
  • 共享存储解决方案
  • 应用级别不合格
Need help with multi-region deployment? Contact our solutions team at solutions@vps.org for architecture consulting.