API Documentation
Regions
/regions
Lists all regions in which new virtual machines can be created. IDs fetched from this API route should be passed into requests to create VMs, as region_id.
Fetches the list of available regions.
-
Success - 200 OK
Returns a JSON object containing a list of available regions.
Example
curl -H 'X-Api-Key: xxxx' https://api.vps247.com/regions
Fetches information on a single region, specified via the id parameter in the URL.
The attributes returned by the request will be:
idThe ID of the region.nameThe name of the datacentre.country_codeAn ISO 3166 country code, describing the location of the datacentre.package_idsA list containing package IDs which may be provisioned at this datacentre.
-
Success - 200 OK
Returns a JSON object containing a single region, specified by the
idparameter in the URL. -
Failure (No Region) - 404 Not Found
Sent if the ID specified does not correspond to an available region.
Example
curl -H 'X-Api-Key: xxxx' https://api.vps247.com/regions/1
Example Response
{
"id":1,
"name":"Manchester 1",
"country_code":"GB",
"package_ids":[1]
}