Schedules¶
Backup, power and size schedules.
Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.
Request and response examples are generated from the schema; the tables under Schemas are the reference.
List schedules¶
GET /
Every backup and power schedule of the project (at most 20); target keeps those acting on one volume or instance, kind one kind.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
kind |
query | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
target |
query | string | Yes |
Responses
{
"items": [
{
"created_at": "string",
"desired": 0,
"id": "string",
"keep": 0,
"kind": "string",
"last_run_at": "string",
"name": "string",
"next_run_at": "string",
"next_start_at": "string",
"next_stop_at": "string",
"paused_reason": "string",
"power": {},
"recurrence": {},
"run_as": "string",
"runs": [
{
"action": "string",
"created_at": "string",
"id": "string",
"operations": [
{
"href": "string",
"id": "string",
"state": "string"
}
],
"reason": "string",
"scheduled_for": "string",
"state": "string",
"targets": [
{}
]
}
],
"state": "string",
"target_type": "string",
"targets": [
{
"id": "string",
"name": "string",
"present": true
}
],
"time_zone": "string",
"updated_at": "string",
"version": 0
}
]
}
Create a schedule¶
POST /
A backup schedule snapshots volumes (or every volume of instances) hourly, daily or weekly and keeps the newest keep it made of each; a power schedule stops and starts instances on a weekly timetable. Its runs act as you: you need the actions they take.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
{
"desired": 0,
"keep": 0,
"kind": "backup",
"name": "string",
"power": {
"days": [
"mon"
],
"start_at": "string",
"stop_at": "string"
},
"recurrence": {
"days": [
"mon"
],
"frequency": "hourly",
"minute": 0,
"time": "string"
},
"target_ids": [
"string"
],
"target_type": "volume",
"time_zone": "string"
}
Responses
{
"created_at": "string",
"desired": 0,
"id": "string",
"keep": 0,
"kind": "string",
"last_run_at": "string",
"name": "string",
"next_run_at": "string",
"next_start_at": "string",
"next_stop_at": "string",
"paused_reason": "string",
"power": {},
"recurrence": {},
"run_as": "string",
"runs": [
{
"action": "string",
"created_at": "string",
"id": "string",
"operations": [
{
"href": "string",
"id": "string",
"state": "string"
}
],
"reason": "string",
"scheduled_for": "string",
"state": "string",
"targets": [
{}
]
}
],
"state": "string",
"target_type": "string",
"targets": [
{
"id": "string",
"name": "string",
"present": true
}
],
"time_zone": "string",
"updated_at": "string",
"version": 0
}
Delete a schedule¶
DELETE /
Nothing runs any more. The snapshots it made stay yours. Send its current version in If-Match.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
if-match |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
schedule_id |
path | string | No |
Responses
Get a schedule¶
GET /
The schedule, its next run and its 20 latest runs, each with its operations.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
org_id |
path | string | No | ||
project_id |
path | string | No | ||
schedule_id |
path | string | No |
Responses
{
"created_at": "string",
"desired": 0,
"id": "string",
"keep": 0,
"kind": "string",
"last_run_at": "string",
"name": "string",
"next_run_at": "string",
"next_start_at": "string",
"next_stop_at": "string",
"paused_reason": "string",
"power": {},
"recurrence": {},
"run_as": "string",
"runs": [
{
"action": "string",
"created_at": "string",
"id": "string",
"operations": [
{
"href": "string",
"id": "string",
"state": "string"
}
],
"reason": "string",
"scheduled_for": "string",
"state": "string",
"targets": [
{}
]
}
],
"state": "string",
"target_type": "string",
"targets": [
{
"id": "string",
"name": "string",
"present": true
}
],
"time_zone": "string",
"updated_at": "string",
"version": 0
}
Change a schedule¶
PATCH /
Renames it or changes its timetable, time zone or keep. Its runs then act as you. Send its current version in If-Match.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
if-match |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
schedule_id |
path | string | No |
Request body
{
"desired": 0,
"keep": 0,
"name": "string",
"power": {
"days": [
"mon"
],
"start_at": "string",
"stop_at": "string"
},
"recurrence": {
"days": [
"mon"
],
"frequency": "hourly",
"minute": 0,
"time": "string"
},
"time_zone": "string"
}
Responses
{
"created_at": "string",
"desired": 0,
"id": "string",
"keep": 0,
"kind": "string",
"last_run_at": "string",
"name": "string",
"next_run_at": "string",
"next_start_at": "string",
"next_stop_at": "string",
"paused_reason": "string",
"power": {},
"recurrence": {},
"run_as": "string",
"runs": [
{
"action": "string",
"created_at": "string",
"id": "string",
"operations": [
{
"href": "string",
"id": "string",
"state": "string"
}
],
"reason": "string",
"scheduled_for": "string",
"state": "string",
"targets": [
{}
]
}
],
"state": "string",
"target_type": "string",
"targets": [
{
"id": "string",
"name": "string",
"present": true
}
],
"time_zone": "string",
"updated_at": "string",
"version": 0
}
Pause a schedule¶
POST /
Nothing runs until it is resumed. Send its current version in If-Match.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
if-match |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
schedule_id |
path | string | No |
Responses
{
"created_at": "string",
"desired": 0,
"id": "string",
"keep": 0,
"kind": "string",
"last_run_at": "string",
"name": "string",
"next_run_at": "string",
"next_start_at": "string",
"next_stop_at": "string",
"paused_reason": "string",
"power": {},
"recurrence": {},
"run_as": "string",
"runs": [
{
"action": "string",
"created_at": "string",
"id": "string",
"operations": [
{
"href": "string",
"id": "string",
"state": "string"
}
],
"reason": "string",
"scheduled_for": "string",
"state": "string",
"targets": [
{}
]
}
],
"state": "string",
"target_type": "string",
"targets": [
{
"id": "string",
"name": "string",
"present": true
}
],
"time_zone": "string",
"updated_at": "string",
"version": 0
}
Resume a schedule¶
POST /
It runs again from its next time after now (never the ones missed while paused), and its runs then act as you. Send its current version in If-Match.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
if-match |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No | ||
schedule_id |
path | string | No |
Responses
{
"created_at": "string",
"desired": 0,
"id": "string",
"keep": 0,
"kind": "string",
"last_run_at": "string",
"name": "string",
"next_run_at": "string",
"next_start_at": "string",
"next_stop_at": "string",
"paused_reason": "string",
"power": {},
"recurrence": {},
"run_as": "string",
"runs": [
{
"action": "string",
"created_at": "string",
"id": "string",
"operations": [
{
"href": "string",
"id": "string",
"state": "string"
}
],
"reason": "string",
"scheduled_for": "string",
"state": "string",
"targets": [
{}
]
}
],
"state": "string",
"target_type": "string",
"targets": [
{
"id": "string",
"name": "string",
"present": true
}
],
"time_zone": "string",
"updated_at": "string",
"version": 0
}
Schemas¶
BackupTimetable¶
| Name | Type | Description |
|---|---|---|
days |
Array<string> | Weekly: the days of the week. |
frequency |
string | |
minute |
integer | null | Hourly: the minute of each hour (default 0). |
time |
string | null | Daily and weekly: the local time, HH:MM. |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
PowerTimetable¶
| Name | Type | Description |
|---|---|---|
days |
Array<string> | The days of the week. |
start_at |
string | null | When to start them again (local time), HH:MM. |
stop_at |
string | null | When to stop the instances (local time), HH:MM. |
ScheduleChangeBody¶
| Name | Type | Description |
|---|---|---|
desired |
integer | null | |
keep |
integer | null | |
name |
string | null | |
power |
PowerTimetable | |
recurrence |
BackupTimetable | |
time_zone |
string | null |
ScheduleCreateBody¶
| Name | Type | Description |
|---|---|---|
desired |
integer | null | A resize: the instance group's size from each run on. |
keep |
integer | null | A backup: how many of its own snapshots of each volume to keep; older ones it made are deleted. |
kind |
string | backup: snapshot the volumes; power: stop and start the instances; resize: set an instance group's size. |
name |
string | |
power |
PowerTimetable | A power schedule's timetable. |
recurrence |
BackupTimetable | A backup's or a resize's timetable. |
target_ids |
Array<string> | vol_, srv_ or igr_ IDs of this project, in one location. |
target_type |
string | Volumes, or instances (a backup snapshots every volume of each instance), or one instance group (a resize). |
time_zone |
string | An IANA time zone, such as Asia/Karachi. |
ScheduleDeleted¶
| Name | Type | Description |
|---|---|---|
deleted |
boolean | |
id |
string |
ScheduleList¶
| Name | Type | Description |
|---|---|---|
items |
Array<ScheduleView> |
ScheduleRunOperation¶
| Name | Type | Description |
|---|---|---|
href |
string | |
id |
string | |
state |
string |
ScheduleRunView¶
| Name | Type | Description |
|---|---|---|
action |
string | snapshot, stop, start or prune (retention). |
created_at |
string | |
id |
string | |
operations |
Array<ScheduleRunOperation> | |
reason |
string | null | Why a target or the run was left out, if one was. |
scheduled_for |
string | |
state |
string | accepted (operations made) or skipped. |
targets |
Array<> |
ScheduleTarget¶
| Name | Type | Description |
|---|---|---|
id |
string | |
name |
string | null | |
present |
boolean |
ScheduleView¶
| Name | Type | Description |
|---|---|---|
created_at |
string | |
desired |
integer | null | A resize schedule's size. |
id |
string | |
keep |
integer | null | |
kind |
string | |
last_run_at |
string | null | |
name |
string | |
next_run_at |
string | null | |
next_start_at |
string | null | |
next_stop_at |
string | null | |
paused_reason |
string | null | |
power |
||
recurrence |
||
run_as |
string | |
runs |
Array<ScheduleRunView> | |
state |
string | |
target_type |
string | |
targets |
Array<ScheduleTarget> | |
time_zone |
string | |
updated_at |
string | |
version |
integer | The ETag: send it in If-Match to change it. |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |