Replace Snapshot Schedules
http
PUT /crates/{handle}/snapshot-schedules
Replaces all of the crate’s schedules with the ones sent, in one change; {"schedules": []} removes them all. Snapshots already taken stay until you delete them. A target can have one schedule of each frequency (422 for a second). Together the schedules can keep up to the plan’s snapshot limit (400 past it); what’s left is room for manual snapshots.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| schedules | array | Yes | Up to 20 schedules, each with the fields below |
| schedules[].target | string | No | crate (the default) or a login’s name for its folder only |
| schedules[].frequency | string | Yes | daily, weekly or monthly |
| schedules[].time | string | Yes | 24-hour UTC time, like 03:00 |
| schedules[].weekday | integer | Weekly | 0 (Sunday) to 6 |
| schedules[].month_day | integer | Monthly | 1 to 28, so every month has it |
| schedules[].keep | integer | Yes | How many of its snapshots to keep (at least 1) |
json
{
"schedules": [
{ "target": "crate", "frequency": "daily", "time": "03:00", "keep": 7 },
{ "target": "c7xk2m9p-backups", "frequency": "monthly", "time": "02:00", "month_day": 1, "keep": 3 }
]
}
Response
json
{ "message": "Schedules saved." }