We have some exciting update news for our API: version 1.4 is not far away from a first release. In addition to major stability and performance improvements, improved status and error responses, there will, as usual, be a few breaking changes. These changes are being made to address some long-term issues related to how regions, images, and plans are viewed.
In version 1.3 and earlier, regions, images, and plans were indexed lists, (unlike everything else). While these indexes made sense in the past, they have started to cause issues and limitations to further improvements on our platform. For instance, a plan index would only hold 1000 different plans, categorized into different layers (e.g., 11xx, 12xx, 13xx, and so on), thereby supporting only 10 different plan types per data center.
The second problem is the lack of consistency, which was mostly noticeable with images. Every time a new image was added or an old one removed, the indexes would change. This would occur when a new version of an OS is released or an older version is removed. For example, you couldn't rely on 1101 always being Debian 9 x64 and 1102 always being Debian 10 x64. Once Debian 9 x64 is removed, Debian 10 x64 becomes 1101 instead.
These issues were addressed many years ago with the introduction of UUID identifiers, which are based on a hash of the name, ensuring permanent consistency. However, the old ID indexes have remained, awaiting removal. Here's how a region looks today. Let's take Stockholm, for instance:
"125": {
"uuid": "ef76ffb1-adbd-425f-98ee-4f744eb7afe6",
"city": "Stockholm",
"state": "Stockholm County",
"country": "Sweden",
"continent": "Europe",
"datacenter_id": 125,
"features": {
"virtual_private_cloud": true,
"ddos_protection": true,
"block_storage": true,
"object_storage": false,
"floating_ip": true,
"ipv6": true,
"backups": true,
"instances": true,
"custom_iso": true,
"databases": false,
"smtp": false
},
"ping_ip": "70.34.194.86",
"latitude": 59.3293235,
"longitude": 18.0685808,
"is_public": true,
"generation": 1,
"operator_id": "439fc2dc"
},
In version 1.3 and earlier, this will remain the same until end of life. However, it's important to note that the issue with changing IDs will not only persist but might also worsen over time. Starting from version 1.4 and above, the index will be completely removed. This means that the Stockholm region will look like this instead:
{
"uuid": "ef76ffb1-adbd-425f-98ee-4f744eb7afe6",
"city": "Stockholm",
"state": "Stockholm County",
"country": "Sweden",
"continent": "Europe",
"datacenter_id": 125,
"features": {
"virtual_private_cloud": true,
"ddos_protection": true,
"block_storage": true,
"object_storage": false,
"floating_ip": true,
"ipv6": true,
"backups": true,
"instances": true,
"custom_iso": true,
"databases": false,
"smtp": false
},
"ping_ip": "70.34.194.86",
"latitude": 59.3293235,
"longitude": 18.0685808,
"is_public": true
},
Now, for regions specifically, the index IDs, which have a lot more dependencies and reliance for information, the ID will remain as a new key called datacenter_id
, and will remain unchanged for a foreseeable future. However, for images and plans, there will be nothing to replace the integer index ID. Instead, use the uuid
.
From version 1.4 onwards, we have ensured that both the id
index and uuid
are supported in all actual function calls, and incorrect values will be corrected in the back-end. If more breaking changes are introduced in version 1.4, we will, of course, announce them well ahead of time. Version 1.3 and below will remain as they are.
Our own control panel at dash.99stack.com will switch over to version 1.4 within the next few days.