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

    /regions/{id}

    Lists information about a single region.

      Fetches information on a single region, specified via the id parameter in the URL.

      The attributes returned by the request will be:

      • id The ID of the region.
      • name The name of the datacentre.
      • country_code An ISO 3166 country code, describing the location of the datacentre.
      • package_ids A 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 id parameter 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]
      }