ഒരു VPS വിതരണത്തിനുള്ള സ്ഥലം കാണിയ്ക്കുക. ഒരു സര്വര് നിര്മ്മിക്കുമ്പോള് സ്ഥലത്തിന്റെ ഐഡി _ഐഡി ആയി പാസ് ചെയ്യുക.
ലഭ്യമായ എല്ലാ ഡേറ്റാ സെന്റിമീറ്ററുകള്ക്കും VPS സര്വറുകള് പരിഷ്കരിക്കാന് സാധ്യമാകുന്ന സ്ഥലങ്ങള് ലഭ്യമാക്കുക.
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
}
]
}
| ഫീള്ഡ് | ടൈപ്പ് ചെയ്യുക | വിവരണം |
|---|---|---|
id |
integer | സ്ഥാനം തിരിച്ചറിയല്. ഒരു സര്വറിനെ സൃഷ്ടിക്കുമ്പോള് ഇതു് സ്ഥാനം_ഐഡി ആയി ഉപയോഗിക്കുക. |
name |
string | മനുഷ്യനു വായിക്കുവാന് സാധിക്കുന്ന സ്ഥലത്തിന്റെ പേരു് |
country_name |
string | രാജ്യം ഈ സ്ഥലത്തു് |
country_code |
string | ISO 3166-1 alpha-2 country code, uppercase |
is_active |
boolean | ഈ സ്ഥലം പുതിയ സര്വര്കള് സ്വീകരിക്കണമോ എന്ന് |
| 200 | ലൊക്കേഷനുകളുടെ ലിസ്റ്റ് വിജയകരമായി വീണ്ടെടുത്തു. |
| 403 | API അടയാളം ലഭ്യമല്ല അല്ലെങ്കില് ആവശ്യമുളള സൂചനയ്ക്ക് ലഭ്യമല്ല |
ഐഡി ഉപയോഗിച്ച് ഒരു സ്ഥലം ലഭ്യമാക്കുക. മുകളില് ഫീള്ഡുകളുള്ള ഒരു സ്ഥലമാണു് മറുപടി.
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.