Machines

API reference for Machines on CUDO Compute.

Reference
GET
/v1/machines-types

List machine types

List machine types that can be ordered

Path attributes

  • Name
    pageNumber
    Type
    integer
    Description
  • Name
    pageSize
    Type
    integer
    Description
  • Name
    projectId
    Type
    string
    Description
Request
GET
/v1/machines-types
    
    curl 'https://rest.compute.cudo.org/v1/machines-types' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "machineTypes": [
    {
      "dataCenterId": "string",
      "id": "string",
      "architecture": "string",
      "cpuCores": "integer",
      "cpuSpeedMhz": "integer",
      "cpuModel": "string",
      "memoryGib": "integer",
      "disks": "integer",
      "diskSizeGib": "integer",
      "gpus": "integer",
      "gpuModelId": "string",
      "prices": [
        {
          "dataCenterId": "string",
          "machineTypeId": "string",
          "commitmentTerm": "string",
          "priceHr": {
            "value": "string"
          },
          "ipv4PriceHr": {
            "value": "string"
          }
        }
      ],
      "machinesFree": "integer",
      "networkType": "string"
    }
  ],
  "totalCount": "integer",
  "pageNumber": "integer",
  "pageSize": "integer"
}

    
  

GET
/v1/machines/operating-systems

List operating systems

List operating systems that can be deployed to machines

Request
GET
/v1/machines/operating-systems
    
    curl 'https://rest.compute.cudo.org/v1/machines/operating-systems' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "images": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "displayName": "string",
      "platform": "string",
      "sizeGib": "integer",
      "installedPackages": [
        {
          "name": "string",
          "description": "string",
          "version": "string"
        }
      ]
    }
  ]
}

    
  

POST
/v1/projects/{machine.projectId}/machines

Create a machine

Order a machine for a project

Body attributes

  • Name
    dataCenterId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
  • Name
    machineTypeId
    Type
    string
    Description
  • Name
    powerState
    Type
    string
    Description
  • Name
    os
    Type
    string
    Description
  • Name
    commitmentTerm
    Type
    string
    Description
  • Name
    userData
    Type
    string
    Description
  • Name
    sshKeySource
    Type
    string
    Description
  • Name
    customSshKeys
    Type
    array
    Description
  • Name
    startScript
    Type
    string
    Description

Path attributes

  • Name
    machine.projectId
    Type
    string
    Description
Request
POST
/v1/projects/{machine.projectId}/machines
    
    curl 'https://rest.compute.cudo.org/v1/projects/{machine.projectId}/machines' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "dataCenterId": "string",
    "id": "string",
    "machineTypeId": "string",
    "powerState": "string",
    "os": "string",
    "commitmentTerm": "string",
    "userData": "string",
    "sshKeySource": "string",
    "customSshKeys": "array",
    "startScript": "string"
}'

    
  
Response
    
    {
  "dataCenterId": "string",
  "id": "string",
  "machineTypeId": "string",
  "architecture": "string",
  "cpuCores": "integer",
  "cpuSpeedMhz": "integer",
  "cpuModel": "string",
  "memoryGib": "integer",
  "disks": "integer",
  "diskSizeGib": "integer",
  "gpus": "integer",
  "gpuModelId": "string",
  "state": "string",
  "powerState": "string",
  "os": "string",
  "hostname": "string",
  "externalIpAddresses": [
    "string"
  ],
  "projectId": "string",
  "createTime": "string",
  "createBy": "string",
  "commitmentTerm": "string",
  "priceHr": {
    "value": "string"
  },
  "userData": "string",
  "sshKeySource": "string",
  "customSshKeys": [
    "string"
  ],
  "startScript": "string"
}

    
  

PATCH
/v1/projects/{machine.projectId}/machines/{machine.id}

Update a machine

Update a machine in a project

Body attributes

  • Name
    dataCenterId
    Type
    string
    Description
  • Name
    machineTypeId
    Type
    string
    Description
  • Name
    powerState
    Type
    string
    Description
  • Name
    os
    Type
    string
    Description
  • Name
    commitmentTerm
    Type
    string
    Description
  • Name
    userData
    Type
    string
    Description
  • Name
    sshKeySource
    Type
    string
    Description
  • Name
    customSshKeys
    Type
    array
    Description
  • Name
    startScript
    Type
    string
    Description

Path attributes

  • Name
    machine.projectId
    Type
    string
    Description
  • Name
    machine.id
    Type
    string
    Description
Request
PATCH
/v1/projects/{machine.projectId}/machines/{machine.id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{machine.projectId}/machines/{machine.id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
    "dataCenterId": "string",
    "machineTypeId": "string",
    "powerState": "string",
    "os": "string",
    "commitmentTerm": "string",
    "userData": "string",
    "sshKeySource": "string",
    "customSshKeys": "array",
    "startScript": "string"
}'

    
  
Response
    
    {
  "dataCenterId": "string",
  "id": "string",
  "machineTypeId": "string",
  "architecture": "string",
  "cpuCores": "integer",
  "cpuSpeedMhz": "integer",
  "cpuModel": "string",
  "memoryGib": "integer",
  "disks": "integer",
  "diskSizeGib": "integer",
  "gpus": "integer",
  "gpuModelId": "string",
  "state": "string",
  "powerState": "string",
  "os": "string",
  "hostname": "string",
  "externalIpAddresses": [
    "string"
  ],
  "projectId": "string",
  "createTime": "string",
  "createBy": "string",
  "commitmentTerm": "string",
  "priceHr": {
    "value": "string"
  },
  "userData": "string",
  "sshKeySource": "string",
  "customSshKeys": [
    "string"
  ],
  "startScript": "string"
}

    
  

GET
/v1/projects/{projectId}/machines

List machines

List machines in a project

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    pageNumber
    Type
    integer
    Description
  • Name
    pageSize
    Type
    integer
    Description
Request
GET
/v1/projects/{projectId}/machines
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "machines": [
    {
      "dataCenterId": "string",
      "id": "string",
      "machineTypeId": "string",
      "architecture": "string",
      "cpuCores": "integer",
      "cpuSpeedMhz": "integer",
      "cpuModel": "string",
      "memoryGib": "integer",
      "disks": "integer",
      "diskSizeGib": "integer",
      "gpus": "integer",
      "gpuModelId": "string",
      "state": "string",
      "powerState": "string",
      "os": "string",
      "hostname": "string",
      "externalIpAddresses": [
        "string"
      ],
      "projectId": "string",
      "createTime": "string",
      "createBy": "string",
      "commitmentTerm": "string",
      "priceHr": {
        "value": "string"
      },
      "userData": "string",
      "sshKeySource": "string",
      "customSshKeys": [
        "string"
      ],
      "startScript": "string"
    }
  ],
  "totalCount": "integer",
  "pageNumber": "integer",
  "pageSize": "integer"
}

    
  

GET
/v1/projects/{projectId}/machines/{id}

Get a machine

Get the details of a machine

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
GET
/v1/projects/{projectId}/machines/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {
  "dataCenterId": "string",
  "id": "string",
  "machineTypeId": "string",
  "architecture": "string",
  "cpuCores": "integer",
  "cpuSpeedMhz": "integer",
  "cpuModel": "string",
  "memoryGib": "integer",
  "disks": "integer",
  "diskSizeGib": "integer",
  "gpus": "integer",
  "gpuModelId": "string",
  "state": "string",
  "powerState": "string",
  "os": "string",
  "hostname": "string",
  "externalIpAddresses": [
    "string"
  ],
  "projectId": "string",
  "createTime": "string",
  "createBy": "string",
  "commitmentTerm": "string",
  "priceHr": {
    "value": "string"
  },
  "userData": "string",
  "sshKeySource": "string",
  "customSshKeys": [
    "string"
  ],
  "startScript": "string"
}

    
  

DELETE
/v1/projects/{projectId}/machines/{id}

Delete a machine

Delete a machine from a project. Machines that are still within a commitment term cannot be deleted.

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
DELETE
/v1/projects/{projectId}/machines/{id}
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines/{id}' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

POST
/v1/projects/{projectId}/machines/{id}/deploy

Deploy operating system

Deploy an operating system onto a machine

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
  • Name
    os
    Type
    string
    Description
  • Name
    userData
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/machines/{id}/deploy
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines/{id}/deploy' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

POST
/v1/projects/{projectId}/machines/{id}/power-off

Power off a machine

Power off a machine in a project

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
  • Name
    force
    Type
    boolean
    Description
Request
POST
/v1/projects/{projectId}/machines/{id}/power-off
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines/{id}/power-off' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

POST
/v1/projects/{projectId}/machines/{id}/power-on

Power on a machine

Power on a machine in a project

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
  • Name
    userData
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/machines/{id}/power-on
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines/{id}/power-on' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}

    
  

POST
/v1/projects/{projectId}/machines/{id}/undeploy

Release machine

Releases a machine allowing subsequent deployment of a new OS

Path attributes

  • Name
    projectId
    Type
    string
    Description
  • Name
    id
    Type
    string
    Description
Request
POST
/v1/projects/{projectId}/machines/{id}/undeploy
    
    curl 'https://rest.compute.cudo.org/v1/projects/{projectId}/machines/{id}/undeploy' \
-H 'Authorization: bearer <YOUR-API-KEY>'\
-H 'Accept: application/json'

    
  
Response
    
    {}