Backups
Add a backup destination
Add an S3-compatible bucket as a backup destination, which only the API can do.
Updated
https://cloud.cahaves.com/api/destinations
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"
Body
application/jsonrequired
namestring
bucketstring
regionstring
endpointstring<uri>
An HTTPS S3-compatible endpoint with no path, query or credentials in it.
access_key_idstringwrite only
Required when adding. Left out of an update, the stored key is kept.
secret_access_keystringwrite only
Required when adding. Left out of an update, the stored key is kept.
Responses
application/json
The destination.
destinationobjectrequired
No console screen adds a destination; this endpoint is the only way. The keys are stored encrypted and never answered back.
Any HTTPS endpoint with no path in it is accepted, but backups are verified, downloadable and pruned only on AWS S3, DigitalOcean Spaces and Cloudflare R2 endpoints on port 443. On any other endpoint, every backup ends with artifact_state unknown and "Automatic retention is unavailable for this storage endpoint." On Spaces, pruning needs bucket versioning. On R2 nothing is pruned.
The destination is saved before the engine is told about it, so a 502 leaves it listed with configured: false. Send Update a backup destination to try again.