POST /storage_boxes/{id}/actions/enable_snapshot_plan
Enables a Snapshot Plan for a given StorageBox. Once enabled, a Snapshot Plan will create Snapshots at predefined intervals. There can only ever be one Snapshot Plan. The existing Snapshot Plan will be deleted before a new one is set up.
Automatic Snapshots are retained until explicitly deleted by the user or the maximum snapshot count for the plan ("max_snapshots") is exceeded.
You can choose the specific time (UTC timezone), day of the week, and day of the month. The time-related options are cron like. Some typical use cases include:
Interval | Request body |
---|---|
Every day at 3 o'clock | {"max_snapshots":10,"minute":0,"hour":3} |
Every Friday at 3 o'clock | {"max_snapshots":10,"minute":0,"hour":3,"day_of_week": 5} |
On the first of every month at half past 6 | {"max_snapshots":10,"minute":30,"hour":6,"day_of_month": 1} |
Servers
- https://api.hetzner.com/v1
Path parameters
Name | Type | Required | Description |
---|---|---|---|
id |
Integer | Yes |
ID of the Storage Box. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
minute |
Integer | No |
Minute the Snapshot Plan should be executed on (UTC). Null means every minute. |
day_of_month |
Integer | No |
Day of the month the Snapshot Plan should be executed on. Null means every day. |
max_snapshots |
Integer | Yes |
Maximum amount of Snapshots that should be created by this Snapshot Plan. Older Snapshots will be deleted. |
day_of_week |
Integer | No |
Day of the week the Snapshot Plan should be executed on. Starts at 1 for Monday til 7 for Sunday. Null means every day. |
hour |
Integer | No |
Hour the Snapshot Plan should be executed on (UTC). Null means every hour. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.