Regions¶
To see full list of regions, you will generally send GET request to the regions endpoint at /api/v1/regions.
List all Regions¶
To list all of the cloud regions available, send a GET request to /api/v1/regions. The response will be a JSON object with a key called regions. This will be set to an array of cloud objects, each of which will contain the standard region attributes:
Attribute | Type | Description |
---|---|---|
country | string | Country, where selected cloud is placed.
|
name | string | Cloud name that you can use upon VM creation
|
coordinates | string | Geographical coordinates where selected cloud is
placed. Lat - is for latitude, lng - for longtitude
|
description | string | Detailed description of selected cloud.
|
cURL Example:
curl -X GET -H 'Content-Type: application/json' -u 'user@example.com:password' "https://cloudsfor.com/api/v1/regions"
Request Headers:
Content-Type: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Response Headers:
content-type: application/json; charset=utf-8
status: 200 OK
Response Body:
{
"regions": [
{
"country": "ru",
"name": "moscow_02",
"coordinates": {
"lat": 55.79682,
"lng": 37.61154
},
"description": "M10/Cloud_02"
},
{
"country": "ru",
"name": "moscow_03",
"coordinates": {
"lat": 55.79682,
"lng": 37.61154
},
"description": "M9/Cloud_03"
}
],
"meta": {
"total": 2
}
}