Crusoe Instance Groups API

The Instance Groups API from Crusoe — 2 operation(s) for instance groups.

OpenAPI Specification

crusoe-instance-groups-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Crusoe Instance Groups API
  version: '1.0'
  description: 'Operations tagged Instance Groups 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: Instance Groups
paths:
  /projects/{project_id}/compute/instance-groups:
    get:
      operationId: listInstanceGroups
      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/listInstanceGroupsResponse'
        '401':
          $ref: '#/components/responses/authError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Lists all instance groups in the project and returns their details.
      tags:
      - Instance Groups
    post:
      operationId: createInstanceGroup
      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/createInstanceGroupResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Creates an instance group in the project and returns the created instance group.
      tags:
      - Instance Groups
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceGroupPostRequest'
        required: true
  /projects/{project_id}/compute/instance-groups/{instance_group_id}:
    delete:
      operationId: deleteInstanceGroup
      parameters:
      - description: ID of the instance group.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: instance_group_id
        required: true
        x-go-name: InstanceGroupID
        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/emptyResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Deletes an instance group from the project.
      tags:
      - Instance Groups
    get:
      operationId: getInstanceGroup
      parameters:
      - description: ID of the instance group.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: instance_group_id
        required: true
        x-go-name: InstanceGroupID
        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/getInstanceGroupResponse'
        '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 instance group in the project.
      tags:
      - Instance Groups
    patch:
      operationId: patchInstanceGroup
      parameters:
      - description: ID of the instance group.
        example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
        in: path
        name: instance_group_id
        required: true
        x-go-name: InstanceGroupID
        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/patchInstanceGroupResponse'
        '400':
          $ref: '#/components/responses/badReqError'
        '401':
          $ref: '#/components/responses/authError'
        '500':
          $ref: '#/components/responses/serverError'
      summary: Updates an instance group in the project and returns the updated instance group.
      tags:
      - Instance Groups
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceGroupPatchRequest'
        required: true
components:
  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
    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
    getInstanceGroupResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InstanceGroup'
    listInstanceGroupsResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ListInstanceGroupsResponse'
    patchInstanceGroupResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InstanceGroup'
    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
    createInstanceGroupResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InstanceGroup'
    emptyResponse:
      description: Empty Response
  schemas:
    InstanceGroupPostRequest:
      properties:
        desired_count:
          description: Desired number of instances for the new instance group.
          example: 3
          format: int64
          type: integer
          x-go-name: DesiredCount
        name:
          description: Name for the new instance group.
          example: my-instance-group
          type: string
          x-go-name: Name
        template_id:
          description: ID of the instance template to create the group's instances from.
          example: 7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc
          type: string
          x-go-name: TemplateID
      required:
      - name
      - template_id
      - desired_count
      title: InstanceGroupPostRequest defines the specifications of the instance group to be created.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    DesiredCount:
      properties:
        value:
          description: New desired number of instances for the instance group.
          example: 3
          format: int64
          type: integer
          x-go-name: Value
      title: DesiredCount defines a wrapper struct for the desired count of VMs in the instance group.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    ListInstanceGroupsResponse:
      description: 'ListInstanceGroupsResponse is the resource response type for GET

        requests to the InstanceGroup endpoint.'
      properties:
        items:
          items:
            $ref: '#/components/schemas/InstanceGroup'
          type: array
          x-go-name: Items
      required:
      - items
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    InstanceGroup:
      properties:
        active_instances:
          description: List of IDs of running instances in the instance group.
          example:
          - 066ce497-889e-4899-b53e-400df3fb7c0e
          items:
            type: string
          type: array
          x-go-name: ActiveInstances
        created_at:
          description: Creation timestamp of the instance group, in RFC3339 format.
          example: '2024-01-01T00:00:00Z'
          type: string
          x-go-name: CreatedAt
        desired_count:
          description: Desired number of instances for the instance group.
          example: 3
          format: int64
          type: integer
          x-go-name: DesiredCount
        id:
          description: ID of the instance group.
          example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
          type: string
          x-go-name: ID
        inactive_instances:
          description: List of IDs of non-running instances in the instance group.
          example:
          - 066ce497-889e-4899-b53e-400df3fb7c0e
          items:
            type: string
          type: array
          x-go-name: InactiveInstances
        instances:
          description: '[To be deprecated] List of IDs of running instances in the instance group.'
          example:
          - 066ce497-889e-4899-b53e-400df3fb7c0e
          items:
            type: string
          type: array
          x-go-name: Instances
        name:
          description: Name of the instance group.
          example: my-instance-group
          type: string
          x-go-name: Name
        project_id:
          description: ID of the project that owns the instance group.
          example: b67aec22-2908-4427-994c-4e32be87477e
          type: string
          x-go-name: ProjectID
        running_instance_count:
          description: Number of running instances currently in the instance group.
          example: 3
          format: int64
          type: integer
          x-go-name: RunningInstanceCount
        state:
          description: Current state of the instance group.
          example: HEALTHY
          type: string
          x-go-name: State
        template_id:
          description: ID of the instance template currently associated with the instance group.
          example: 7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc
          type: string
          x-go-name: TemplateID
        updated_at:
          description: Last update timestamp of the instance group, in RFC3339 format.
          example: '2024-01-01T00:00:00Z'
          type: string
          x-go-name: UpdatedAt
      required:
      - name
      - id
      - template_id
      - created_at
      - updated_at
      - project_id
      - state
      - running_instance_count
      - instances
      - active_instances
      - inactive_instances
      - desired_count
      title: InstanceGroup defines the specification of an instance group.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
    InstanceGroupPatchRequest:
      description: 'This is a separate type from InstanceGroupPostRequest for clearer documentation, as these fields are not required

        in the PATCH endpoint.'
      properties:
        desired_count:
          $ref: '#/components/schemas/DesiredCount'
        name:
          description: New name for the instance group.
          example: my-instance-group
          type: string
          x-go-name: Name
        template_id:
          description: ID of the instance template to associate with the instance group.
          example: 7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc
          type: string
          x-go-name: TemplateID
      title: InstanceGroupPatchRequest defines the specifications of the updates to be made to the instance group.
      type: object
      x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/models
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