# Public API Changelog All notable changes to this API will be documented here. The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). There are no versions at this time. Only date stamps. For the latest actual specification, please see `/openapi.json` or `/docs`. ## Recent breaking changes - If a server fails to autorenew due to insufficient funds (maintain 7+ days expiration), it will be powered off to signal that the token has run out. To turn through the remaining balance you have to disable autorenew on the server and then power it on. If you top up a token, you have to manually power on the server after if it's been stopped. - `/server/{machine_id}/forget` no longer deletes the server from the database. It now sets `forgotten_at` as a signal that the server is to be ignored by clients. Deleted servers, whether forgotten or not, will be removed from our database after 90 days. - Type of `id` in invoices changed from an integer to a string. ## Notices - Servers set to autorenew are recommended to have 7 days when launched. This may be enforced at some point. - `POST /token/{token}/add` should no longer be polled. `legacy_polling=false` is the new default and `legacy_polling` option will be ignored altogether. ## [Currently deprecated features] - `/server/{machine_id}/info`'s `deleted` is deprecated in favor of `deleted_at`. - `/token/{token}/info`'s `burn_rate` is deprecated in favor of `burn_rate_cents`. - `payment` of `POST /token/{token}/add` is deprecated in favor of `invoice`. ## [2024-02-26] ## Changed - `POST /token/{token}/add`: `legacy_polling=false` is the new default and mandatory (see the 2024-01-03 entry). Polling the endpoint is highly discouraged. Use `GET /token/{token}/invoice/{invoice}` if you wish to poll, after `POST /token/{token}/add` which will return the invoice and its ID. ## Removed - `POST /server/{machine_id}/delete` in favor of `DELETE /server/{machine_id}`. - `POST /server/{machine_id}/destroy` in favor of `DELETE /server/{machine_id}`. ## [2024-01-03] Happy New Year! ## Added - Added `GET /token/{token}/invoice/{invoice}` to retrieve status of an individual invoice. - If you set `legacy_polling` to `false` when using `/token/{token}/add`, the backend will process payments for you in the background so you don't have to POST continously to make sure payments go through. This defaults to legacy polling being on, for legacy compatibility. In the future the default will probably change, either as this endpoint or another. You can use the afforementioned GET endpoint to poll if you are curious about when the payment is acknowledged. This is recommended over continous POSTing, and the (currently default) behavior of `legacy_polling` being `true` is now deprecated. ## Changed - Invoice's `id` type changed from a int to a string. ## [2023-10-31] ## Added - Added `suspended_at` datetime or null field to server info to indicate when a server was suspended, if ever. If you have a suspended server, check your token messages and respond. Suspended servers are powered off and cannot be powered on without manual intervention. - Added `suspended_servers` to token info response. This tells you how many non-deleted suspended servers are on your token. - Added `autorenew_servers` to token info response. This tells you how many non-deleted autorenew servers are on your token. ## [2023-10-02] ## Changed - Can no longer renew/topup a server to more than one year out. Autorenew is recommended instead. ## [2023-08-31] ## Added - Additional flavor types. ## [2023-07-30] ## Added - Set Cloud Init user data at server launch with optional `user_data` field. ## [2023-06-13] ## Changed - If a server fails to autorenew due to insufficient funds (maintain 7+ days expiration), it will be powered off to signal that the token has run out. To turn through the remaining balance you have to disable autorenew on the server and then power it on. If you top up a token, you have to manually power on the server after if it's been stopped. ## [2023-05-25] ## Added - `PATCH /server/{machine_id}` to update `hostname`, and/or `autorenew`. May supercede `POST /server/{machine_id}/autorenew/enable` and `disable` endpoints in the future. ## [2023-05-15] ## Changed - Messages (for tokens) will be deleted after 90 days. ## [2023-05-11] ## Added - `expired` property to token invoices, to easily determine if the invoice is expired or not. Only relevant if unpaid. ## Changed - `/token/{token}/add` also sends `invoice`. `payment` and `token` are now deprecated. ## [2023-05-03] ## Added - `/server/{machine_id}/info` now has a `deleted_by` field. Servers deleted before this feature will simply see `null` for this. ## Changed - `/server/{machine_id}/forget` no longer deletes the server from the database. It now sets `forgotten_at` as a signal that the server is to be ignored by clients. ## [2023-04-14] ## Added - `/token/{token}/info` now has `burn_rate_usd`. - `/token/{token}/info` now has `burn_rate_cents` which supercedes `burn_rate`. ## Changed - `/operatingsystems` endpoint now returns a dictionary with slightly more information about the operating system (namely, minimum disk space needed for it). - `/server/{machine ID}/launch` will now return a detailed 422 if the operating system won't fit on the flavor, rather than failing with an obscure 500. ## [2023-04-13] ## Added - `/changelog` endpoint. ## [2023-04-12] ## Changed - `/server/{machine ID}/launch` endpoint changed to 204 empty response. - `/server/{machine ID}/topup` endpoint changed to 204 empty response.