Crusoe Snapshots API
The Snapshots API from Crusoe — 2 operation(s) for snapshots.
The Snapshots API from Crusoe — 2 operation(s) for snapshots.
swagger: '2.0'
info:
description: The API Gateway exposes all publicly available API endpoints for Crusoe Cloud products.
title: Crusoe Cloud API Gateway Audit Logs Snapshots API
version: v1alpha5
host: api.crusoecloud.com
basePath: /v1alpha5
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Snapshots
paths:
/projects/{project_id}/storage/snapshots:
get:
description: Size of snapshots will be in bytes.
tags:
- Snapshots
summary: Retrieve details about all disk snapshots that belong to the logged in user.
operationId: listDiskSnapshots
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/listDiskSnapshotsResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'500':
$ref: '#/responses/serverError'
post:
description: A successful response from this resource will contain the async operation.
tags:
- Snapshots
summary: Create a new snapshot for a disk owned by the logged in user.
operationId: createDiskSnapshot
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
- name: Body
in: body
required: true
schema:
$ref: '#/definitions/DiskSnapshotPostRequestV1Alpha5'
responses:
'200':
$ref: '#/responses/asyncOperationResponse'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'500':
$ref: '#/responses/serverError'
/projects/{project_id}/storage/snapshots/{snapshot_id}:
get:
description: Size of snapshot will be in bytes.
tags:
- Snapshots
summary: Retrieve details about a disk snapshot that belongs to the logged in user.
operationId: getDiskSnapshot
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: SnapshotID
name: snapshot_id
in: path
required: true
responses:
'200':
$ref: '#/responses/getSnapshotResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'500':
$ref: '#/responses/serverError'
delete:
description: A successful response from this resource will contain the async operation.
tags:
- Snapshots
summary: Delete a disk snapshot owned by the logged in user.
operationId: deleteDiskSnapshot
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: SnapshotID
name: snapshot_id
in: path
required: true
responses:
'200':
$ref: '#/responses/asyncOperationResponse'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'500':
$ref: '#/responses/serverError'
patch:
description: A successful response from this resource will contain the updated snapshot.
tags:
- Snapshots
summary: Rename a disk snapshot owned by the logged in user.
operationId: renameDiskSnapshot
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: SnapshotID
name: snapshot_id
in: path
required: true
- name: Body
in: body
required: true
schema:
$ref: '#/definitions/DiskSnapshotPatchRequest'
responses:
'200':
$ref: '#/responses/syncOperationResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'500':
$ref: '#/responses/serverError'
definitions:
Operation:
description: 'Individual resources that use Operations should populate the `metadata` field
with resource-specific information.'
type: object
title: Operation contains the common fields for all Operation API objects.
required:
- operation_id
- state
- metadata
- started_at
- completed_at
properties:
completed_at:
type: string
x-go-name: CompletedAt
example: '2021-12-03T19:59:34Z'
metadata:
x-go-name: Metadata
example: '{}'
operation_id:
type: string
x-go-name: ID
example: F6EF489C-086E-458D-B812-7962964A28C9
result:
x-go-name: Result
example: '{}'
started_at:
type: string
x-go-name: StartedAt
example: '2021-12-03T19:58:34Z'
state:
type: string
enum:
- IN_PROGRESS
- SUCCEEDED
- FAILED
x-go-name: State
example: IN_PROGRESS
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
AsyncOperationResponse:
type: object
title: AsyncOperationResponse is the response type for endpoints which return async operations.
required:
- operation
properties:
operation:
$ref: '#/definitions/Operation'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
SyncOperationResponse:
type: object
title: SyncOperationResponse is the response type for endpoints which return completed synchronous operations.
required:
- operation
properties:
operation:
$ref: '#/definitions/Operation'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
DiskSnapshotPostRequestV1Alpha5:
type: object
required:
- disk_id
- name
properties:
disk_id:
type: string
x-go-name: DiskID
example: 123e4567-e89b-12d3-a456-426614174000
name:
type: string
x-go-name: Name
example: my-snapshot-1
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
DiskSnapshot:
type: object
required:
- id
- created_at
- updated_at
- created_from
- size
- block_size
properties:
block_size:
type: integer
format: int64
x-go-name: BlockSize
example: 4096
created_at:
type: string
x-go-name: CreatedAt
example: '2021-12-03T19:58:34Z'
created_from:
type: string
x-go-name: CreatedFrom
example: 123e4567-e89b-12d3-a456-426614174000
id:
type: string
x-go-name: ID
example: 123e4567-e89b-12d3-a456-426614174000
name:
type: string
x-go-name: Name
example: my-snapshot
size:
type: string
x-go-name: Size
example: 10457 bytes
updated_at:
type: string
x-go-name: UpdatedAt
example: '2021-12-03T19:58:34Z'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
DiskSnapshotPatchRequest:
type: object
required:
- name
properties:
name:
type: string
x-go-name: Name
example: my-snapshot
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
ListDiskSnapshotsResponseV1Alpha5:
type: object
required:
- items
properties:
items:
type: array
items:
$ref: '#/definitions/DiskSnapshot'
x-go-name: Items
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
responses:
serverError:
description: Error Internal Server
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '500'
message:
type: string
x-go-name: Message
example: internal_error
getSnapshotResponse:
description: ''
schema:
$ref: '#/definitions/DiskSnapshot'
listDiskSnapshotsResponse:
description: ''
schema:
$ref: '#/definitions/ListDiskSnapshotsResponseV1Alpha5'
badReqError:
description: Error Bad Request
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '400'
message:
type: string
x-go-name: Message
example: bad_request
syncOperationResponse:
description: ''
schema:
$ref: '#/definitions/SyncOperationResponse'
asyncOperationResponse:
description: ''
schema:
$ref: '#/definitions/AsyncOperationResponse'
permissionsError:
description: Error Permissions
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '403'
message:
type: string
x-go-name: Message
example: unauthorized
authError:
description: Error Authentication Failed
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '401'
message:
type: string
x-go-name: Message
example: bad_credential
x-tagGroups:
- name: Compute
tags:
- VMs
- VM Operations
- Images
- Instance Templates
- Custom Images
- Custom Image Operations
- name: Organizations
tags:
- Projects
- Entities
- Prospects
- Billing
- Usage
- Quotas
- Audit Logs
- Reservations
- name: Users
tags:
- Identities
- Roles
- SSH Keys
- Tokens
- name: Storage
tags:
- Disks
- Disk Operations
- Snapshots
- Snapshot Operations
- name: Networking
tags:
- VPC Firewall Rules
- VPC Firewall Rule Operations
- VPC Networks
- VPC Subnets
- IB Partitions
- Load Balancers
- name: Orchestration
tags:
- Kubernetes Clusters
- Kubernetes Cluster Operations
- Kubernetes Node Pools
- Kubernetes Node Pool Operations
- Kubernetes Versions
- AutoClusters
- AutoCluster Operations
- name: Locations
tags:
- Locations
- name: Capacities
tags:
- Capacities