Services
Set a database's pre-deploy dump
Take, or stop taking, a database dump before each deployment.
Updated
https://cloud.cahaves.com/api/services/{id}/predeploy-backup
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.
Path parameters
idstring<uuid>required
The service's id.
Example: "0b9e4d2a-7c13-4f6e-a8d5-3e1c9b7f2a40"
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
enabledbooleanrequired
A JSON boolean. A string such as "true" answers 422.
backup_schedule_idstring<uuid> | null
Required to turn it on. A schedule that is not a database dump of this service answers 422, and another customer's answers 404.
Responses
application/json
The service with its new setting.
serviceobjectrequired
Works on PostgreSQL, MySQL, MariaDB and MongoDB databases; any other service answers 422. enabled must be a JSON boolean.
To turn it on, send backup_schedule_id: a database dump schedule of this same database whose destination is configured. Its timer may be paused. Another customer's schedule answers 404, and a schedule that is not this database's dump answers 422. To turn it off, send { "enabled": false } alone.
| Status | Sentence |
|---|---|
409 | Wait for the service deployment to finish. |
409 | This service has unfinished backup work. |
409 | Configure the selected backup destination first. |
Backups explains how the deployment waits for the dump.