Backups
List archived services
The services Cloud archived for billing, their final backups and when those are deleted.
Updated
https://cloud.cahaves.com/api/archives
Authorization
cahaves.cloud.sessionstringcookierequired
The session cookie Cloud sets when a customer signs in to the console with GitHub or Google. It is HttpOnly, so scripts cannot read it, and there are no API keys or tokens yet.
Headers
X-Cloud-Organizationstring<uuid>
The id of the organization the request works in, one the signed-in customer owns. Left out or empty, the request works in their oldest organization. Any other value answers 404 with `reason: "organization"`. A customer with no organization yet gets 409 "Create an organization first." from every route that works in one.
Example: "2f6c8e0a-4b1d-4e7f-9a3c-5d7e9f1b3a5c"
Responses
application/json
The archives.
archivesobject[]required
The services of the organization the request works in that Cloud archived for billing (Archived for billing): when a stop for an unpaid month or for no card lasts, Cloud takes a final backup of each paid service's data, then deletes the service. The archive outlives the service, so service_name, kind, subtype and project are its own copies, and project.id is null once the project is deleted too. Those still archiving come first, then the newest archived.
state is archiving while the final backups are taken and the service still exists, which includes a failed backup waiting a day to be tried again; kept once the service is deleted and its final backups can be downloaded; deleting once keep_until has passed and Cloud is deleting them; and deleted once they are gone. archived_at and keep_until are null while archiving, and deleted_at is set once deleted.
backups are the final backups that finished, each a backup run (Get a backup): a database_dump of a database, or a volume_archive of one of an application's volumes, named by volume_name. An application with no volume, a Redis database, a compose stack and a service that never ran have none. download_url is the route that downloads the file (Download a backup) while the archive is archiving or kept and the run's artifact_state is retained, which Cloud confirms within the hour after the backup, and null otherwise.
An archive whose organization pays after archiving keeps its backups until keep_until, and its service is not restored. /api/me counts the archives still kept in current_organization.archives_kept.