Locations

Get Locations

get

Retrieves the available physical locations where you can deploy cloud resources in a VDC.

A location is identified by a combination of the following characters:

  • a two-character regionId, which represents a country (example: 'de')

  • a three-character locationId, which represents a city. The 'locationId' is typically based on the IATA code of the city's airport (example: 'txl').

Note that 'locations' are read-only and cannot be changed.

Authorizations
Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/locations HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "https://api.ionos.com/cloudapi/v6/locations",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "location",
      "href": "https://api.ionos.com/cloudapi/v6/locations/de",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "berlin",
        "features": [
          "cloud-init-private-image",
          "ssd",
          "vnf-nat"
        ],
        "imageAliases": [
          "windows:2012r2_iso",
          "windows:2019_iso",
          "ubuntu:18.04_iso"
        ],
        "cpuArchitecture": [
          {
            "cpuFamily": "INTEL_ICELAKE",
            "maxCores": 62,
            "maxRam": 245760,
            "vendor": "AuthenticAMD"
          }
        ],
        "gpuArchitecture": [
          {
            "vendor": "NVIDIA",
            "model": "A100"
          }
        ]
      }
    }
  ]
}

Get Locations within a Region

get

Retrieves the available locations in a region specified by its ID. The 'regionId' consists of the two character identifier of the region (country), e.g., 'de'.

Authorizations
Path parameters
regionIdstringRequired

The unique ID of the region.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/locations/{regionId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "https://api.ionos.com/cloudapi/v6/locations",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "location",
      "href": "https://api.ionos.com/cloudapi/v6/locations/de",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "berlin",
        "features": [
          "cloud-init-private-image",
          "ssd",
          "vnf-nat"
        ],
        "imageAliases": [
          "windows:2012r2_iso",
          "windows:2019_iso",
          "ubuntu:18.04_iso"
        ],
        "cpuArchitecture": [
          {
            "cpuFamily": "INTEL_ICELAKE",
            "maxCores": 62,
            "maxRam": 245760,
            "vendor": "AuthenticAMD"
          }
        ],
        "gpuArchitecture": [
          {
            "vendor": "NVIDIA",
            "model": "A100"
          }
        ]
      }
    }
  ]
}

Get Location by ID

get

Retrieves the information about the location specified by its ID. The 'locationId' consists of the three-digit identifier of the city according to the IATA code.

Authorizations
Path parameters
regionIdstringRequired

The unique ID of the region.

locationIdstringRequired

The unique ID of the location.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on

Default: 0
Header parameters
X-Contract-Numberinteger · int32Optional

Users with multiple contracts must provide the contract number, for which all API requests are to be executed.

Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/locations/{regionId}/{locationId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "location",
  "href": "https://api.ionos.com/cloudapi/v6/locations/de",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "berlin",
    "features": [
      "cloud-init-private-image",
      "ssd",
      "vnf-nat"
    ],
    "imageAliases": [
      "windows:2012r2_iso",
      "windows:2019_iso",
      "ubuntu:18.04_iso"
    ],
    "cpuArchitecture": [
      {
        "cpuFamily": "INTEL_ICELAKE",
        "maxCores": 62,
        "maxRam": 245760,
        "vendor": "AuthenticAMD"
      }
    ],
    "gpuArchitecture": [
      {
        "vendor": "NVIDIA",
        "model": "A100"
      }
    ]
  }
}

Was this helpful?