Listum loci ubi VPS deployare potest. Passum loci id ut location_id cum servitum creas.
In hoc modo, invenitur numerus in quo servitor invenit se.
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": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"name": "New Jersey",
"country_name": "United States",
"country_code": "US",
"is_active": true
}
]
}
| Campo | Typus | Descriptio |
|---|---|---|
id |
integer | Identificator locationis. Ut location_id in creatione servitii utitur. |
name |
string | Nomen loci humane legibile |
country_name |
string | Natione in qua locus est |
country_code |
string | ISO 3166-1 alpha-2 codex civitatis, majuscula |
is_active |
boolean | Si loci novum servitum acceptat |
| 200 | Index locorum feliciter recuperatus |
| 403 | Token API mancant vel invalidus, aut token permissum necesse non habet |
In hoc modo, in situ invenitur quod est, et in situ est quod est.
curl -X GET "https://admin.vps.org/api/v1/locations/1/" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"id": 1,
"name": "New Jersey",
"country_name": "United States",
"country_code": "US",
"is_active": true
}
Every VPS.org server currently runs in our New Jersey, USA location, which serves customers worldwide over IPv4 and IPv6. Always read the locations endpoint rather than hardcoding an id, so your integration picks up new locations when they are added.