Organization API: Customer Portal: Snapshots
The 9 Organization API operations for snapshots.
Part of Customer Portal.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots |
List snapshots |
| POST | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots |
Create snapshot |
| GET | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/estimate |
How much of the allowance a snapshot of this server would use |
| GET | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed |
The restore a server ordered from a snapshot is waiting on, or got |
| POST | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed/retry |
Run a failed seed again |
| DELETE | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid} |
Delete snapshot |
| GET | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/download |
Download snapshot |
| POST | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/lock |
Keep a snapshot, or release it |
| POST | /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/restore |
Restore onto this server, from any snapshot this customer owns |
List snapshots
Section titled List snapshotsGET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots
Snapshots taken from this server or, with scope=account, every
snapshot the account holds, each judged for restoring onto this server.
The account list is the owner's, since those are the only snapshots a restore here would accept; a shared-server viewer asking for it gets this server's own list, the same as the platform client surface.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
uuid |
path | string | yes | |
org_slug |
path | string | yes | |
scope |
query | string | no | Default: this. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Create snapshot
Section titled Create snapshotPOST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
name |
string | yes |
ignored_files |
array of string or null | no |
is_locked |
boolean | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
How much of the allowance a snapshot of this server would use
Section titled How much of the allowance a snapshot of this server would useGET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/estimate
How much of the allowance a snapshot of this server would use.
Its own endpoint rather than a field on the listing, because the figure is read live from Wings: folding it into the list would make the snapshots tab as slow as the slowest node on the fleet, on every load, to answer a question only the create dialog asks.
Deliberately an over-estimate. It is the server's current uncompressed disk usage, and an archive is never larger than what it archives, so a creation that fits on this number cannot push the account over. The retention policy depends on that. What the customer sees is therefore a ceiling, and the dialog says so.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
The restore a server ordered from a snapshot is waiting on, or got
Section titled The restore a server ordered from a snapshot is waiting on, or gotGET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed
The restore a server ordered from a snapshot is waiting on, or got.
Null for a server ordered the ordinary way, which is nearly all of them.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Run a failed seed again
Section titled Run a failed seed againPOST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/seed/retry
Run a failed seed again. A failed restore leaves the snapshot unharmed.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Delete snapshot
Section titled Delete snapshotDELETE /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
snapshot_uuid |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Download snapshot
Section titled Download snapshotGET /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/download
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
snapshot_uuid |
path | string | yes |
org_slug |
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/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/lock
Keep a snapshot, or release it. A locked snapshot is not rotated away.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
snapshot_uuid |
path | string | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Restore onto this server, from any snapshot this customer owns
Section titled Restore onto this server, from any snapshot this customer ownsPOST /api/v1/orgs/{org_slug}/portal/servers/{uuid}/snapshots/{snapshot_uuid}/restore
Restore onto this server, from any snapshot this customer owns.
Addressed by the target server because that is what is being overwritten, and what the permission is checked against.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
snapshot_uuid |
path | string | yes |
org_slug |
path | string | yes |
Request body
Section titled Request bodyapplication/json
| 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. |