Crusoe Custom Images API

The CustomImages API from Crusoe — 3 operation(s) for customimages.

OpenAPI Specification

crusoe-customimages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Crusoe Custom Images API
  version: '1.0'
  description: 'Operations tagged CustomImages across 2 of this provider''s published API definitions: crusoe-cloud-api-gateway-v1-openapi.json, crusoe-cloud-api-gateway-v1alpha5-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.cloud.crusoe.ai/v1
tags:
- name: CustomImages
paths:
  /projects/{project_id}/compute/custom-images:
    get:
      operationId: listCustomImages
      parameters:
      - example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: project_id
        required: true
        x-go-name: ProjectID
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/listImagesResponse'
        '401':
          $ref: '#/components/responses/authError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Lists all custom images in the project and returns their details.
      tags:
      - CustomImages
    post:
      operationId: customImagePost
      parameters:
      - description: ID of the project that owns the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: project_id
        required: true
        x-go-name: ProjectID
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/asyncOperationResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '403':
          $ref: '#/components/responses/permissionsError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Creates a custom image in the project and returns the async operation.
      tags:
      - CustomImages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomImagePostRequest'
        required: true
  /projects/{project_id}/compute/custom-images/{image_id}:
    delete:
      operationId: customImageDelete
      parameters:
      - description: ID of the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: image_id
        required: true
        x-go-name: ImageID
        schema:
          type: string
      - description: ID of the project that owns the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: project_id
        required: true
        x-go-name: ProjectID
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/asyncOperationResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '403':
          $ref: '#/components/responses/permissionsError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Deletes a custom image from the project and returns the async operation.
      tags:
      - CustomImages
    get:
      operationId: getCustomImage
      parameters:
      - description: ID of the image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: image_id
        required: true
        x-go-name: ImageID
        schema:
          type: string
      - example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: project_id
        required: true
        x-go-name: ProjectID
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/getImageResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Returns details for a single custom image in the project.
      tags:
      - CustomImages
    patch:
      operationId: customImagePatch
      parameters:
      - description: ID of the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: image_id
        required: true
        x-go-name: ImageID
        schema:
          type: string
      - description: ID of the project that owns the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: project_id
        required: true
        x-go-name: ProjectID
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/asyncOperationResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '403':
          $ref: '#/components/responses/permissionsError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Updates a custom image in the project and returns the async operation.
      tags:
      - CustomImages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomImagePatchRequest'
        required: true
  /projects/{project_id}/compute/custom-images/{image_id}/edit-tags:
    patch:
      operationId: customImageEditTags
      parameters:
      - description: ID of the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: image_id
        required: true
        x-go-name: ImageID
        schema:
          type: string
      - description: ID of the project that owns the custom image.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: project_id
        required: true
        x-go-name: ProjectID
        schema:
          type: string
      responses:
        '200':
          $ref: '#/components/responses/asyncOperationResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '403':
          $ref: '#/components/responses/permissionsError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Updates the tags of a custom image in the project and returns the async operation.
      tags:
      - CustomImages
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomImageEditTagsRequest'
        required: true
components:
  schemas:
    Image:
      properties:
        created_at:
          description: Creation timestamp of the image, in RFC3339 format.
          example: '2023-06-29T20:03:26Z'
          type: string
          x-go-name: CreatedAt
        description:
          description: Description of the image.
          example: base Ubuntu 20.04 image
          type: string
          x-go-name: Description
        id:
          description: ID of the image.
          example: 09ae8411-0fbb-411c-898c-2b8f19622ae1
          type: string
          x-go-name: ID
        locations:
          description: Locations where the image is available.
          example: '[us-east1, us-northcentral1]'
          items:
            type: string
          type: array
          x-go-name: Locations
        name:
          description: Name of the image.
          example: ubuntu
          type: string
          x-go-name: Name
        tags:
          description: Tags associated with the image.
          example: '[20.4, latest]'
          items:
            type: string
          type: array
          x-go-name: Tags
      required:
      - id
      - name
      - description
      - tags
      - created_at
      - locations
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    CustomImageEditTagsRequest:
      properties:
        tags:
          description: New set of tags to associate with the custom image.
          example: '[latest]'
          items:
            type: string
          type: array
          x-go-name: Tags
      required:
      - tags
      title: CustomImagesEditTagsRequest is the request type for PATCH requests to the /custom-images{id}/edit-tags endpoint.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    ListImagesResponseV1:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Image'
          type: array
          x-go-name: Items
      required:
      - items
      title: ListImagesResponseV1 is the resource response type for GET requests to the Images endpoint.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    AsyncOperationResponse:
      properties:
        operation:
          $ref: '#/components/schemas/Operation'
      required:
      - operation
      title: AsyncOperationResponse is the response type for endpoints which return async operations.
      type: object
      x-go-package: gitlab.com/crusoeenergy/schemas/utils/fetch
    CustomImagePostRequest:
      properties:
        DiskID:
          description: ID of the disk to create the custom image from.
          example: 182d01c7-d3fe-424b-af13-8775aeead194
          type: string
        description:
          description: Description for the new custom image.
          example: Ubuntu is the modern, open source operating system on Linux for ...
          type: string
          x-go-name: Description
        name:
          description: Name for the new custom image.
          example: ubuntu
          type: string
          x-go-name: Name
        tags:
          description: Tags to associate with the new custom image.
          example: 22.04,latest
          items:
            type: string
          type: array
          x-go-name: Tags
      required:
      - DiskID
      - name
      title: CustomImagePostRequest is the request type for POST requests to the /custom-images endpoint.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    CustomImagePatchRequest:
      properties:
        description:
          description: New description for the custom image.
          example: '"Ubuntu is the modern, open source operating system on Linux for ..."'
          type: string
          x-go-name: Description
      required:
      - description
      title: CustomImagePatchRequest is the request type for PATCH requests to the /custom-images/{id} endpoint.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    Operation:
      description: 'Individual resources that use Operations should populate the `metadata` field

        with resource-specific information.'
      properties:
        completed_at:
          example: '2021-12-03T19:59:34Z'
          type: string
          x-go-name: CompletedAt
        metadata:
          example: '{}'
          x-go-name: Metadata
        operation_id:
          example: F6EF489C-086E-458D-B812-7962964A28C9
          type: string
          x-go-name: ID
        result:
          example: '{}'
          x-go-name: Result
        started_at:
          example: '2021-12-03T19:58:34Z'
          type: string
          x-go-name: StartedAt
        state:
          enum:
          - IN_PROGRESS
          - SUCCEEDED
          - FAILED
          example: IN_PROGRESS
          type: string
          x-go-name: State
      required:
      - operation_id
      - state
      - metadata
      - started_at
      - completed_at
      title: Operation contains the common fields for all Operation API objects.
      type: object
      x-go-package: gitlab.com/crusoeenergy/schemas/utils/fetch
  responses:
    notFoundError:
      description: Error Not Found
      content:
        application/json:
          schema:
            properties:
              code:
                example: '404'
                type: string
                x-go-name: Code
              message:
                example: not_found
                type: string
                x-go-name: Message
            required:
            - code
            - message
            type: object
    asyncOperationResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AsyncOperationResponse'
    serverError:
      description: Error Internal Server
      content:
        application/json:
          schema:
            properties:
              code:
                example: '500'
                type: string
                x-go-name: Code
              message:
                example: internal_error
                type: string
                x-go-name: Message
            required:
            - code
            - message
            type: object
    getImageResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Image'
    authError:
      description: Error Authentication Failed
      content:
        application/json:
          schema:
            properties:
              code:
                example: '401'
                type: string
                x-go-name: Code
              message:
                example: bad_credential
                type: string
                x-go-name: Message
            required:
            - code
            - message
            type: object
    badReqError:
      description: Error Bad Request
      content:
        application/json:
          schema:
            properties:
              code:
                example: '400'
                type: string
                x-go-name: Code
              message:
                example: bad_request
                type: string
                x-go-name: Message
            required:
            - code
            - message
            type: object
    listImagesResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListImagesResponseV1'
    permissionsError:
      description: Error Permissions
      content:
        application/json:
          schema:
            properties:
              code:
                example: '403'
                type: string
                x-go-name: Code
              message:
                example: unauthorized
                type: string
                x-go-name: Message
            required:
            - code
            - message
            type: object
x-refined-from:
- crusoe-cloud-api-gateway-v1-openapi.json
- crusoe-cloud-api-gateway-v1alpha5-openapi.json
x-tagGroups:
- name: Compute
  tags:
  - VMs
  - VM Operations
  - Images
  - Instance Templates
- name: Organizations
  tags:
  - Projects
  - Billing
  - Entities
  - Prospects
  - Usage
  - Quotas
  - Audit Logs
  - SCIM
- name: Users
  tags:
  - Identities
  - SSH Keys
  - Tokens
- name: Storage
  tags:
  - Disks
  - Disk Operations
  - Snapshots
  - Snapshot Operations
  - S3Buckets
  - S3Users
- name: Networking
  tags:
  - VPC Firewall Rules
  - VPC Firewall Rule Operations
  - VPC Networks
  - VPC Subnets
  - IB Partitions
  - Load Balancers
  - NVLink Domains
- 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
- name: Container Registry
  tags:
  - Container Registry
- name: Foundry
  tags:
  - Foundry