Client API: Deployment servers: Snapshots
The 8 Client API operations for snapshots.
Part of Deployment servers.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/snapshots |
Every snapshot this account holds, across every server it has had |
| GET | /api/v1/client/snapshots/allowance |
The account's snapshot meter |
| GET | /api/v1/client/snapshots/{snapshot_uuid} |
One snapshot, for the order form that was handed its uuid in a link |
| DELETE | /api/v1/client/snapshots/{snapshot_uuid} |
Delete a snapshot and the archive behind it |
| POST | /api/v1/client/snapshots/{snapshot_uuid}/cancel |
Cancel a snapshot that is still being taken |
| GET | /api/v1/client/snapshots/{snapshot_uuid}/download |
A signed URL for the archive itself |
| POST | /api/v1/client/snapshots/{snapshot_uuid}/lock |
Keep a snapshot, or release it |
| POST | /api/v1/client/snapshots/{snapshot_uuid}/restore |
Restore a snapshot onto one of this account's servers |
Every snapshot this account holds, across every server it has had
Section titled Every snapshot this account holds, across every server it has hadGET /api/v1/client/snapshots
Every snapshot this account holds, across every server it has had.
Not scoped to a server on purpose, and the reason the table is owned by the account: after a service ends there is no server to ask.
Authentication: an access token, sent as Authorization: Bearer <token>.
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
A 200 response is a list; each item has these fields:
| Field | Type |
|---|---|
[].id |
integer |
[].uuid |
string |
[].name |
string |
[].kind |
string |
[].status |
string |
[].size_bytes |
integer |
[].is_locked |
boolean |
[].created_by |
string |
[].reason |
string or null |
[].region |
string or null |
[].checksum |
string or null |
[].checksum_type |
string or null |
[].error |
string or null |
[].hold_reason |
string or null |
[].source_id |
integer or null |
[].source_uuid |
string or null |
[].source_server_name |
string or null |
[].source_name |
string or null |
[].source_location |
string or null |
[].source_used_bytes |
integer or null |
[].source_deleted |
boolean |
[].egg_id |
integer or null |
[].software |
SnapshotSoftware or null |
[].software.slug |
string or null |
[].software.name |
string or null |
[].software.mcjars_type |
string or null |
[].software.loader |
string or null |
[].software.loader_family |
string or null |
[].software.game |
string or null |
[].software.edition |
string or null |
[].software.version |
string or null |
[].software.runtime_template_slug |
string or null |
[].software.docker_image |
string or null |
[].software.modpack |
object or null |
[].software.memory_mb |
integer or null |
[].software.disk_mb |
integer or null |
[].software.inferred |
boolean |
[].software_label |
string |
[].software_slug |
string or null |
[].software_version |
string or null |
[].compatibility |
SnapshotCompatibility or null |
[].compatibility.level |
string |
[].compatibility.reason |
string |
[].is_source |
boolean or null |
[].schedule_uuid |
string or null |
[].schedule_name |
string or null |
[].created_at |
string (date-time) |
[].completed_at |
string (date-time) or null |
The account's snapshot meter
Section titled The account's snapshot meterGET /api/v1/client/snapshots/allowance
The account's snapshot meter.
Read on a replica and never written: it computes the same numbers a creation attempt decides on, from the same tables. The grace clock is the one the nightly sweep and the creation path last stored.
Authentication: an access token, sent as Authorization: Bearer <token>.
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
Fields of a 200 response:
| Field | Type |
|---|---|
allowance_bytes |
integer |
used_bytes |
integer |
available_bytes |
integer |
bonus_bytes |
integer |
over |
boolean |
cleanup_at |
string (date-time) or null |
over_since |
string (date-time) or null |
breakdown |
array of object |
One snapshot, for the order form that was handed its uuid in a link
Section titled One snapshot, for the order form that was handed its uuid in a linkGET /api/v1/client/snapshots/{snapshot_uuid}
One snapshot, for the order form that was handed its uuid in a link.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
snapshot_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
uuid |
string |
name |
string |
kind |
string |
status |
string |
size_bytes |
integer |
is_locked |
boolean |
created_by |
string |
reason |
string or null |
region |
string or null |
checksum |
string or null |
checksum_type |
string or null |
error |
string or null |
hold_reason |
string or null |
source_id |
integer or null |
source_uuid |
string or null |
source_server_name |
string or null |
source_name |
string or null |
source_location |
string or null |
source_used_bytes |
integer or null |
source_deleted |
boolean |
egg_id |
integer or null |
software |
SnapshotSoftware or null |
software.slug |
string or null |
software.name |
string or null |
software.mcjars_type |
string or null |
software.loader |
string or null |
software.loader_family |
string or null |
software.game |
string or null |
software.edition |
string or null |
software.version |
string or null |
software.runtime_template_slug |
string or null |
software.docker_image |
string or null |
software.modpack |
object or null |
software.memory_mb |
integer or null |
software.disk_mb |
integer or null |
software.inferred |
boolean |
software_label |
string |
software_slug |
string or null |
software_version |
string or null |
compatibility |
SnapshotCompatibility or null |
compatibility.level |
string |
compatibility.reason |
string |
is_source |
boolean or null |
schedule_uuid |
string or null |
schedule_name |
string or null |
created_at |
string (date-time) |
completed_at |
string (date-time) or null |
Delete a snapshot and the archive behind it
Section titled Delete a snapshot and the archive behind itDELETE /api/v1/client/snapshots/{snapshot_uuid}
Delete a snapshot and the archive behind it.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
snapshot_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Cancel a snapshot that is still being taken
Section titled Cancel a snapshot that is still being takenPOST /api/v1/client/snapshots/{snapshot_uuid}/cancel
Cancel a snapshot that is still being taken.
Works while the snapshot's status is pending or creating. We stop it
and remove it, with whatever it had uploaded, so the server can take a new
one straight away. A snapshot you locked can still be cancelled.
Answers 409 when the snapshot has already finished or failed (delete it instead), 403 when it is on hold, and 503 when we could not reach storage. Nothing changes on a 503, so try again.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
snapshot_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
A signed URL for the archive itself
Section titled A signed URL for the archive itselfGET /api/v1/client/snapshots/{snapshot_uuid}/download
A signed URL for the archive itself.
Never gated on owing money. "Pay to get your data" is legally uncomfortable in the EU and reputationally worse, and the revenue it could recover is one month of a plan the customer has already left.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
snapshot_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Keep a snapshot, or release it
Section titled Keep a snapshot, or release itPOST /api/v1/client/snapshots/{snapshot_uuid}/lock
Keep a snapshot, or release it.
A lock stops rotation and an accidental delete. It does not exempt the snapshot from the retention sweep, so it cannot be used to hold storage after a downgrade.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
snapshot_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
uuid |
string |
name |
string |
kind |
string |
status |
string |
size_bytes |
integer |
is_locked |
boolean |
created_by |
string |
reason |
string or null |
region |
string or null |
checksum |
string or null |
checksum_type |
string or null |
error |
string or null |
hold_reason |
string or null |
source_id |
integer or null |
source_uuid |
string or null |
source_server_name |
string or null |
source_name |
string or null |
source_location |
string or null |
source_used_bytes |
integer or null |
source_deleted |
boolean |
egg_id |
integer or null |
software |
SnapshotSoftware or null |
software.slug |
string or null |
software.name |
string or null |
software.mcjars_type |
string or null |
software.loader |
string or null |
software.loader_family |
string or null |
software.game |
string or null |
software.edition |
string or null |
software.version |
string or null |
software.runtime_template_slug |
string or null |
software.docker_image |
string or null |
software.modpack |
object or null |
software.memory_mb |
integer or null |
software.disk_mb |
integer or null |
software.inferred |
boolean |
software_label |
string |
software_slug |
string or null |
software_version |
string or null |
compatibility |
SnapshotCompatibility or null |
compatibility.level |
string |
compatibility.reason |
string |
is_source |
boolean or null |
schedule_uuid |
string or null |
schedule_name |
string or null |
created_at |
string (date-time) |
completed_at |
string (date-time) or null |
Restore a snapshot onto one of this account's servers
Section titled Restore a snapshot onto one of this account's serversPOST /api/v1/client/snapshots/{snapshot_uuid}/restore
Restore a snapshot onto one of this account's servers.
Addressed by snapshot rather than by server because the target is a choice. The permission is checked against the target server, because that is the one being overwritten and the one a subuser was or was not trusted with.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
snapshot_uuid |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
target_server_uuid |
string or null | no |
truncate |
boolean | no |
allow_mismatch |
boolean | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |