Crusoe Custom Images API
The Custom Images API from Crusoe — 3 operation(s) for custom images.
The Custom Images API from Crusoe — 3 operation(s) for custom images.
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 Custom Images API
version: v1alpha5
host: api.crusoecloud.com
basePath: /v1alpha5
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Custom Images
paths:
/projects/{project_id}/compute/custom-images:
get:
tags:
- Custom Images
summary: List all custom VM images available for use.
operationId: listCustomImages
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/listImagesResponse'
'401':
$ref: '#/responses/authError'
'500':
$ref: '#/responses/serverError'
post:
tags:
- Custom Images
summary: Create a custom image.
operationId: customImagePost
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/CustomImagePostRequest'
responses:
'200':
$ref: '#/responses/asyncOperationResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'404':
$ref: '#/responses/notFoundError'
'500':
$ref: '#/responses/serverError'
/projects/{project_id}/compute/custom-images/{image_id}:
get:
tags:
- Custom Images
summary: Retrieve details about a VM image.
operationId: getCustomImage
parameters:
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ImageID
name: image_id
in: path
required: true
- type: string
example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/getImageResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'404':
$ref: '#/responses/notFoundError'
'500':
$ref: '#/responses/serverError'
delete:
tags:
- Custom Images
summary: Delete a custom image.
operationId: customImageDelete
parameters:
- type: string
x-go-name: ImageID
name: image_id
in: path
required: true
- type: string
x-go-name: ProjectID
name: project_id
in: path
required: true
responses:
'200':
$ref: '#/responses/asyncOperationResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'404':
$ref: '#/responses/notFoundError'
'500':
$ref: '#/responses/serverError'
patch:
tags:
- Custom Images
summary: Update a custom image's description.
operationId: customImagePatch
parameters:
- type: string
x-go-name: ImageID
name: image_id
in: path
required: true
- type: string
x-go-name: ProjectID
name: project_id
in: path
required: true
- name: Body
in: body
required: true
schema:
$ref: '#/definitions/CustomImagePatchRequest'
responses:
'200':
$ref: '#/responses/asyncOperationResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'404':
$ref: '#/responses/notFoundError'
'500':
$ref: '#/responses/serverError'
/projects/{project_id}/compute/custom-images/{image_id}/edit-tags:
patch:
tags:
- Custom Images
summary: Update a custom image's tags.
operationId: customImageEditTags
parameters:
- type: string
x-go-name: ImageID
name: image_id
in: path
required: true
- type: string
x-go-name: ProjectID
name: project_id
in: path
required: true
- name: Body
in: body
required: true
schema:
$ref: '#/definitions/CustomImageEditTagsRequest'
responses:
'200':
$ref: '#/responses/asyncOperationResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'404':
$ref: '#/responses/notFoundError'
'500':
$ref: '#/responses/serverError'
definitions:
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
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
CustomImagePatchRequest:
type: object
title: CustomImagePatchRequest is the request type for PATCH requests to the /custom-images/{id} endpoint.
required:
- description
properties:
description:
type: string
x-go-name: Description
example: '"Ubuntu is the modern, open source operating system on Linux for ..."'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
CustomImagePostRequest:
type: object
title: CustomImagePostRequest is the request type for POST requests to the /custom-images endpoint.
required:
- DiskID
- name
properties:
DiskID:
type: string
example: 182d01c7-d3fe-424b-af13-8775aeead194
description:
type: string
x-go-name: Description
example: Ubuntu is the modern, open source operating system on Linux for ...
name:
type: string
x-go-name: Name
example: ubuntu
tags:
type: array
items:
type: string
x-go-name: Tags
example: 22.04,latest
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
CustomImageEditTagsRequest:
type: object
title: CustomImagesEditTagsRequest is the request type for PATCH requests to the /custom-images{id}/edit-tags endpoint.
required:
- tags
properties:
tags:
type: array
items:
type: string
x-go-name: Tags
example: '[latest]'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
ListImagesResponseV1Alpha5:
type: object
title: ListImagesResponseV1Alpha5 is the resource response type for GET requests to the Images endpoint.
required:
- items
properties:
items:
type: array
items:
$ref: '#/definitions/Image'
x-go-name: Items
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
Image:
type: object
required:
- id
- name
- description
- tags
- created_at
- locations
properties:
created_at:
type: string
x-go-name: CreatedAt
example: '2023-06-29T20:03:26Z'
description:
type: string
x-go-name: Description
example: base Ubuntu 20.04 image
id:
type: string
x-go-name: ID
example: 09ae8411-0fbb-411c-898c-2b8f19622ae1
locations:
type: array
items:
type: string
x-go-name: Locations
example: '[us-east1, us-southcentral1]'
name:
type: string
x-go-name: Name
example: ubuntu
tags:
type: array
items:
type: string
x-go-name: Tags
example: '[20.4, latest]'
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
responses:
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
getImageResponse:
description: ''
schema:
$ref: '#/definitions/Image'
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
notFoundError:
description: Error Not Found
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '404'
message:
type: string
x-go-name: Message
example: not_found
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
asyncOperationResponse:
description: ''
schema:
$ref: '#/definitions/AsyncOperationResponse'
listImagesResponse:
description: ''
schema:
$ref: '#/definitions/ListImagesResponseV1Alpha5'
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