Crusoe Cloud API Gateway (v1alpha5)
Download OpenAPI specification:Download
The API Gateway exposes all publicly available API endpoints for Crusoe Cloud products.
Create new VM instances owned by the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
count required | integer <int64> The number of VMs to create. If multiple locations are specified, this will be the number of VMs created in each location. |
instance_group_id | string The ID of the instance group the VMs will be created in. |
object (InstanceTemplate defines the specifications of VMs to be created during bulk VM creation.) | |
instance_template_id | string The ID of the instance template to use for creating the VMs. |
Array of objects (BulkCreateLocationInfo) The locations to create the VMs in. This will override any location specified in the instance template. | |
name_prefix required | string The name prefix for the VMs to be created. E.g. "my-vm" will create VMs with names "my-vm-1", |
object (ReservationSpecification) |
Responses
Request samples
- Payload
{- "count": 6,
- "instance_group_id": "cda562c4-6162-4565-95f3-ce06a8220c07",
- "instance_template": {
- "disks": [
- {
- "size": "10GiB",
- "type": "persistent-ssd"
}
], - "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "image_name": "ubuntu:20.04",
- "location": "us-northcentral1-a",
- "public_ip_address_type": "static",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "shutdown_script": "\"#!/bin/bash\\necho'goodbye'\"",
- "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
- "startup_script": "\"#!/bin/bash\\necho'hello'\"",
- "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "template_name": "my-instance-template",
- "type": "a100.2x",
- "virtualization_features": {
- "nested_virtualization": true
}
}, - "instance_template_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "locations": [
- {
- "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "location": "us-northcentral1-a",
- "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}
], - "name_prefix": "my-vm",
- "reservation_specification": {
- "id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "selection_strategy": "lowest_cost"
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details about all VMs that the logged in user owns or has access to.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
ids | string Example: ids=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
names | string Example: names=my-first-vm |
types | string Example: types=a40.2x,a100.8x |
locations | string Example: locations=us-east1,us-northcentral1 |
states | string Example: states=STATE_RUNNING |
limit | string Example: limit=20 |
sort | string Example: sort=name |
next_token | string Example: next_token=bXktZmlyc3Qtdm0 |
prev_token | string Example: prev_token=bXktZmlyc3Qtdm0 |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "commitment_end": "string",
- "commitment_period": 0,
- "created_at": "2021-12-03T19:58:34Z",
- "disks": [
- {
- "attachment_type": "os | data",
- "block_size": 4096,
- "created_at": "2021-12-03T19:58:34Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "location": "us-northcentral1-a",
- "mode": "read-write | read-only",
- "name": "my-disk",
- "serial_number": "96FD14FDBCF7E21E8EC",
- "size": "10GiB",
- "type": "persistent-ssd",
- "updated_at": "2021-12-03T19:58:34Z"
}
], - "host_channel_adapters": [
- {
- "guid": "946d:ae03:0021:69aa",
- "ib_network_id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "ib_partition_id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "type": "infiniband"
}
], - "id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "instance_group_id": "707749bd-ecad-4de8-aa00-1ae2fdb99e19",
- "instance_template_id": "75c6712a-8da8-463c-a72d-fc65cf922959",
- "location": "us-centralnorth1-a",
- "name": "my-first-vm",
- "network_interfaces": [
- {
- "id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "interface_type": "ethernet",
- "ips": [
- {
- "private_ipv4": {
- "address": "10.1.2.3"
}, - "public_ipv4": {
- "address": "121.0.0.0",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "type": "dynamic"
}
}
], - "mac_address": "00:00:5e:00:53:af",
- "name": "network-interface-1",
- "network": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "subnet": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
], - "pod_id": "29d20dc4-90ad-4365-ab05-83f5f5e52d94",
- "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "ssh_destination": "12.21.12.21:22",
- "state": "RUNNING",
- "type": "a100.2x",
- "updated_at": "2023-08-14T09:00:35Z",
- "virtualization_features": {
- "nested_virtualization": true
}
}
], - "next_page_token": "bXktbGFzdC12bQ",
- "prev_page_token": "bXktZmlyc3Qtdm0"
}
Create a new VM instance owned by the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
commitment_period | integer <int64> commitment is no longer supported |
Array of objects (DiskAttachment) | |
Array of objects (PartialHostChannelAdapter is used when POSTing and PATCHing VMs to assign IB Partitions.) | |
image | string |
location | string |
name required | string |
Array of objects (NetworkInterface) | |
object (ReservationSpecification) | |
shutdown_script | string |
ssh_public_key required | string |
startup_script | string |
type required | string |
object (VirtualizationFeatures) |
Responses
Request samples
- Payload
{- "commitment_period": 0,
- "disks": "[{disk_id: \"09ae8411-0fbb-411c-898c-2b8f19622ae1\", mode: \"read-write\", attach_type: \"data\"},",
- "host_channel_adapters": [
- {
- "ib_partition_id": "string"
}
], - "image": "ubuntu:20.04",
- "location": "us-northcentral1-a",
- "name": "my-first-vm",
- "network_interfaces": [
- {
- "id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "interface_type": "ethernet",
- "ips": [
- {
- "private_ipv4": {
- "address": "10.1.2.3"
}, - "public_ipv4": {
- "address": "121.0.0.0",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "type": "dynamic"
}
}
], - "mac_address": "00:00:5e:00:53:af",
- "name": "network-interface-1",
- "network": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "subnet": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
], - "reservation_specification": {
- "id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "selection_strategy": "lowest_cost"
}, - "shutdown_script": "#!/bin/bash\\necho'goodbye'",
- "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
- "startup_script": "#!/bin/bash\\necho'hello'",
- "type": "a100.2x",
- "virtualization_features": {
- "nested_virtualization": true
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details about a particular VM.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vm_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "commitment_end": "string",
- "commitment_period": 0,
- "created_at": "2021-12-03T19:58:34Z",
- "disks": [
- {
- "attachment_type": "os | data",
- "block_size": 4096,
- "created_at": "2021-12-03T19:58:34Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "location": "us-northcentral1-a",
- "mode": "read-write | read-only",
- "name": "my-disk",
- "serial_number": "96FD14FDBCF7E21E8EC",
- "size": "10GiB",
- "type": "persistent-ssd",
- "updated_at": "2021-12-03T19:58:34Z"
}
], - "host_channel_adapters": [
- {
- "guid": "946d:ae03:0021:69aa",
- "ib_network_id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "ib_partition_id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "type": "infiniband"
}
], - "id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "instance_group_id": "707749bd-ecad-4de8-aa00-1ae2fdb99e19",
- "instance_template_id": "75c6712a-8da8-463c-a72d-fc65cf922959",
- "location": "us-centralnorth1-a",
- "name": "my-first-vm",
- "network_interfaces": [
- {
- "id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "interface_type": "ethernet",
- "ips": [
- {
- "private_ipv4": {
- "address": "10.1.2.3"
}, - "public_ipv4": {
- "address": "121.0.0.0",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "type": "dynamic"
}
}
], - "mac_address": "00:00:5e:00:53:af",
- "name": "network-interface-1",
- "network": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "subnet": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
], - "pod_id": "29d20dc4-90ad-4365-ab05-83f5f5e52d94",
- "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "ssh_destination": "12.21.12.21:22",
- "state": "RUNNING",
- "type": "a100.2x",
- "updated_at": "2023-08-14T09:00:35Z",
- "virtualization_features": {
- "nested_virtualization": true
}
}
Delete a VM that the logged in user owns.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vm_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Change the state of a VM the logged in user owns.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vm_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
action required | string Enum: "START" "STOP" "RESET" "RESERVE" "UNRESERVE" "UPDATE" The action to perform on the VM. REESRVE and UNRESERVE operations are done synchronously, and so will have succeeded with a 200 response. |
commitment_period | integer <int64> CommitmentPeriod is deprecated, please use reservationID instead |
Array of objects (PartialHostChannelAdapter is used when POSTing and PATCHing VMs to assign IB Partitions.) | |
Array of objects (NetworkInterface) | |
reservation_id | string |
type | string |
Responses
Request samples
- Payload
{- "action": "START",
- "commitment_period": 0,
- "host_channel_adapters": [
- {
- "ib_partition_id": "string"
}
], - "network_interfaces": [
- {
- "id": "ca39e669-47ee-456b-968d-303234fbf99f",
- "interface_type": "ethernet",
- "ips": [
- {
- "private_ipv4": {
- "address": "10.1.2.3"
}, - "public_ipv4": {
- "address": "121.0.0.0",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "type": "dynamic"
}
}
], - "mac_address": "00:00:5e:00:53:af",
- "name": "network-interface-1",
- "network": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "subnet": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
], - "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "type": "a100.2x"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Attach disks to a VM the logged in user owns.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vm_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
required | Array of objects (DiskAttachment) | ||||||
Array
|
Responses
Request samples
- Payload
{- "attach_disks": "[{disk_id: \"09ae8411-0fbb-411c-898c-2b8f19622ae1\", mode: \"read-write\", attachment_type: \"data\"}, {disk_id: \"b1f86d1b-42d2-490d-adb0-cc1029abf653\", mode: \"read-only\", attachment_type: \"data\"}]"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Detach disks from a VM the logged in user owns.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vm_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
detach_disks required | Array of strings |
Responses
Request samples
- Payload
{- "detach_disks": [
- "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "123e4567-e89b-12d3-a456-426614174000"
]
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve information about the types of VMs that are available.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "cpu_cores": 4,
- "cpu_type": "intel",
- "description": "2x Nvidia A100",
- "disk_gb": 8,
- "disk_type": "SSD",
- "gpu_type": "A100",
- "memory_gb": 16,
- "memory_type": "RAM",
- "num_gpu": 2,
- "product_name": "a100.2x"
}
]
}
Get status of asynchronous operations
This resource retrieves information about the status of asynchronous operations initiated by the instances resource. All operations that are either in-flight or completed but not yet queried will be returned.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=IN_PROGRESS |
lower_time_bound | string Example: lower_time_bound=2021-12-03T19:58:34Z |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
]
}
Get the status of a single asynchronous operation
This resource retrieves information about the status of an asynchronous operation initiated by the instances resource. Only information about the operation specified in the path will be returned, or an HTTP 403 will be returned if the operation does not exist, was not initiated by the logged in user, or has expired.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
operation_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "created_at": "2023-06-29T20:03:26Z",
- "description": "base Ubuntu 20.04 image",
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "locations": "[us-east1, us-northcentral1]",
- "name": "ubuntu",
- "tags": "[20.4, latest]"
}
]
}
Retrieve details about a VM image.
path Parameters
image_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "created_at": "2023-06-29T20:03:26Z",
- "description": "base Ubuntu 20.04 image",
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "locations": "[us-east1, us-northcentral1]",
- "name": "ubuntu",
- "tags": "[20.4, latest]"
}
Lists all VM instance templates available for use.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "created_at": "2024-01-01T00:00:00Z",
- "disks": [
- {
- "size": "10GiB",
- "type": "persistent-ssd"
}
], - "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "image_name": "ubuntu:20.04",
- "location": "us-northcentral1-a",
- "name": "my-instance-template",
- "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "public_ip_address_type": "static",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "shutdown_script": "#!/bin/bash\\necho'goodbye'",
- "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
- "startup_script": "#!/bin/bash\\necho'hello'",
- "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "type": "a100.2x",
- "virtualization_features": {
- "nested_virtualization": true
}
}
]
}
Create a VM instance template, for use in bulk VM creation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
Array of objects (DiskTemplate defines a disk to create for each VM during bulk VM creation.) Disks to create for all VMs created from this instance template. | |
ib_partition_id | string IB Partition to use for all VMs created from this instance template. Should only be provided for IB-enabled VM types. This is location-specific and must be provided if location is provided. |
image_name | string OS Image to use for all VMs created from this instance template. |
location | string Location to use for all VMs created from this instance template. If provided, all location-specific resources must also be provided. |
public_ip_address_type | string Public IP address type to use for all VMs created from this instance template. Must either be "static" or "dynamic". |
reservation_id | string |
shutdown_script | string Shutdown script to use for all VMs created from this instance template. |
ssh_public_key required | string SSH public key to use for all VMs created from this instance template. |
startup_script | string Startup script to use for all VMs created from this instance template. |
subnet_id | string Subnet to use for all VMs created from this instance template. This is location-specific and must be provided if location is provided. |
template_name required | string Name of the instance template. (This is not the name of the VMs created from this instance template.) |
type required | string Product name of the VM type we want to create from this instance template. |
object (VirtualizationFeatures) |
Responses
Request samples
- Payload
{- "disks": [
- {
- "size": "10GiB",
- "type": "persistent-ssd"
}
], - "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "image_name": "ubuntu:20.04",
- "location": "us-northcentral1-a",
- "public_ip_address_type": "static",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "shutdown_script": "\"#!/bin/bash\\necho'goodbye'\"",
- "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
- "startup_script": "\"#!/bin/bash\\necho'hello'\"",
- "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "template_name": "my-instance-template",
- "type": "a100.2x",
- "virtualization_features": {
- "nested_virtualization": true
}
}
Response samples
- 200
- 400
- 401
- 500
{- "created_at": "2024-01-01T00:00:00Z",
- "disks": [
- {
- "size": "10GiB",
- "type": "persistent-ssd"
}
], - "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "image_name": "ubuntu:20.04",
- "location": "us-northcentral1-a",
- "name": "my-instance-template",
- "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "public_ip_address_type": "static",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "shutdown_script": "#!/bin/bash\\necho'goodbye'",
- "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
- "startup_script": "#!/bin/bash\\necho'hello'",
- "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "type": "a100.2x",
- "virtualization_features": {
- "nested_virtualization": true
}
}
Retrieve details about a VM instance template.
path Parameters
instance_template_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "created_at": "2024-01-01T00:00:00Z",
- "disks": [
- {
- "size": "10GiB",
- "type": "persistent-ssd"
}
], - "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "image_name": "ubuntu:20.04",
- "location": "us-northcentral1-a",
- "name": "my-instance-template",
- "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "public_ip_address_type": "static",
- "reservation_id": "804bf3a2-81f2-4d78-9a9e-dc6a55ed33d8",
- "shutdown_script": "#!/bin/bash\\necho'goodbye'",
- "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCspdG97nTS/h4PEPq2QD2RYVK1jxFXLFZuSDMI8Rtxpucl6LDZLOghEYoj13lxKQnGtcsM3Iu68lh+4YgZe7CbI6cc/TxPbeAX2HJTqDh0J7+GAlLBHK9tsepC0QlhIDiazJptOPDZ3cesCBXdxSnzEbhDaqgYOfl393cp1fCeOKRIDWEP3H9CM25dCbWF66sTDziLsojJ9dMnxhgKm9/JkZc5gYncLT/2Ey+VWfV9Fs65mGUrBbQOn3c8S/nEk6WRcYn4PFOnIp0Mz+Chb50iCJrW677pllLnkTGSU+4c0H9J5z4HDG0I+91RoiQ0QsayFTYO1JtSn+THLuq98V+D",
- "startup_script": "#!/bin/bash\\necho'hello'",
- "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "type": "a100.2x",
- "virtualization_features": {
- "nested_virtualization": true
}
}
Delete a VM instance template.
path Parameters
instance_template_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 400
- 401
- 500
{- "code": "400",
- "message": "bad_request"
}
Lists all instance groups.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "created_at": "2024-01-01T00:00:00Z",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "instances": [
- "066ce497-889e-4899-b53e-400df3fb7c0e"
], - "name": "my-instance-group",
- "project_id": "b67aec22-2908-4427-994c-4e32be87477e",
- "running_instance_count": 3,
- "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc",
- "updated_at": "2024-01-01T00:00:00Z"
}
]
}
Create an instance group.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
name required | string Name of the instance group. |
template_id required | string Instance Template ID to be associated with the instance group. |
Responses
Request samples
- Payload
{- "name": "my-instance-group",
- "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc"
}
Response samples
- 200
- 400
- 401
- 500
{- "created_at": "2024-01-01T00:00:00Z",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "instances": [
- "066ce497-889e-4899-b53e-400df3fb7c0e"
], - "name": "my-instance-group",
- "project_id": "b67aec22-2908-4427-994c-4e32be87477e",
- "running_instance_count": 3,
- "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc",
- "updated_at": "2024-01-01T00:00:00Z"
}
Retrieve details about an instance group.
path Parameters
instance_group_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "created_at": "2024-01-01T00:00:00Z",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "instances": [
- "066ce497-889e-4899-b53e-400df3fb7c0e"
], - "name": "my-instance-group",
- "project_id": "b67aec22-2908-4427-994c-4e32be87477e",
- "running_instance_count": 3,
- "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc",
- "updated_at": "2024-01-01T00:00:00Z"
}
Update an instance group.
path Parameters
instance_group_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
name | string Name of the instance group. |
template_id | string Instance Template ID to be associated with the instance group. |
Responses
Request samples
- Payload
{- "name": "my-instance-group",
- "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc"
}
Response samples
- 200
- 400
- 401
- 500
{- "created_at": "2024-01-01T00:00:00Z",
- "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "instances": [
- "066ce497-889e-4899-b53e-400df3fb7c0e"
], - "name": "my-instance-group",
- "project_id": "b67aec22-2908-4427-994c-4e32be87477e",
- "running_instance_count": 3,
- "template_id": "7e6a6c5a-1314-409a-9e4f-3cc9f2a68fcc",
- "updated_at": "2024-01-01T00:00:00Z"
}
Retrieve details about projects that the logged in user belongs to or owns.
If querying for projects within an organization, the logged in user must be the owner of the organization.
query Parameters
org_id | string Example: org_id=ee2a6bc3-aed5-4756-8995-9990a53d3a17 |
project_name | string Example: project_name=default |
Responses
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
]
}
Update details for a project that the logged in user owns.
Requests to this resource must contain the json-encoded representation of the changes they want to make to the project. Currently only the project's name can be changed.
query Parameters
project_id required | string Example: project_id=f058d0db-2fa4-4cf2-8cf1-dfbcfe05a814 |
Request Body schema: application/json
name required | string |
Responses
Request samples
- Payload
{- "name": "Crusoe Energy"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "project": {
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
}
Create a new project that will be owned by the logged in user.
The logged in user must have the permission to create projects within the organization. A successful response from this resource contains details of the created project.
Request Body schema: application/json
name required | string |
organization_id required | string |
Responses
Request samples
- Payload
{- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "project": {
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
}
Retrieve details about a project that the logged in user belongs to or owns.
path Parameters
project_id required | string Example: ee2a6bc3-aed5-4756-8995-9990a53d3a17 |
Responses
Response samples
- 200
- 401
- 500
{- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
Delete a project that the logged in user owns.
Delete operations cascade to VMs created under that project.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 401
- 403
- 500
{- "code": "401",
- "message": "bad_credential"
}
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "billing": {
- "balance": "$1000.00",
- "delinquent": false,
- "has_valid_payment_method": true
}, - "features": {
- "property1": { },
- "property2": { }
}, - "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "name": "Crusoe Energy",
- "relation": "owner",
- "state": "string",
- "state_reason": "string"
}
]
}
Update details for an organization that the logged in user owns.
A successful response from this resource will contain the updated organization details.
query Parameters
org_id required | string Example: org_id=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
organization_name required | string |
Responses
Request samples
- Payload
{- "organization_name": "Crusoe Energy"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "entity": {
- "billing": {
- "balance": "$1000.00",
- "delinquent": false,
- "has_valid_payment_method": true
}, - "features": {
- "property1": { },
- "property2": { }
}, - "id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "name": "Crusoe Energy",
- "relation": "owner",
- "state": "string",
- "state_reason": "string"
}
}
Get project-level usage for products in Crusoe Cloud.
path Parameters
organization_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
projects required | Array of strings Example: projects=d8f58dfd-dd86-4ee4-8f01-643e6d0f15bb |
resource_types required | Array of strings Example: resource_types=persistent-ssd,a40.1x |
regions required | Array of strings Example: regions=us-east1,us-northcentral1 |
start_date required | string Example: start_date="2022-07-01" |
end_date required | string Example: end_date="2023-08-08" |
Responses
Response samples
- 200
- 400
- 500
{- "items": [
- {
- "billable_metric": "\"gpu-hours\"",
- "date": "\"2022-07-01\"",
- "project_id": "\"d8f58dfd-dd86-4ee4-8f01-643e6d0f15bb\"",
- "quantity": 2.123,
- "region": "\"us-northcentral1\"",
- "reservation_id": "\"d8f58dfd-dd86-4ee4-8f01-643e6d0f15bb\"",
- "resource_type": "\"a40.1x\""
}
]
}
Get resource-level usage for products in Crusoe Cloud.
path Parameters
organization_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
projects required | Array of strings Example: projects=d8f58dfd-dd86-4ee4-8f01-643e6d0f15bb |
resources required | Array of strings Example: resources=d8f58dfd-dd86-4ee4-8f01-643e6d0f15bb |
resource_types required | Array of strings Example: resource_types=persistent-ssd,a40.1x |
regions required | Array of strings Example: regions=us-east1,us-northcentral1 |
start_date required | string Example: start_date="2022-07-01" |
end_date required | string Example: end_date="2023-08-08" |
Responses
Response samples
- 400
- 500
{- "code": "400",
- "message": "bad_request"
}
Get options which exist for filters for /usage and /usage/export routes.
path Parameters
organization_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 500
{- "end_date": "\"2023-08-08\"",
- "projects": [
- "d8f58dfd-dd86-4ee4-8f01-643e6d0f15bb"
], - "regions": [
- "us-east1",
- "us-northcentral1"
], - "resource_types": [
- "persistent-ssd",
- "a40.1x"
], - "start_date": "\"2022-07-01\""
}
Get audit logs belonging to the specified organization. User must be part of the organization.
path Parameters
organization_id required | string Example: de8f27fe-8438-45e7-a2c2-a2767660625f |
query Parameters
project_ids | string Example: project_ids=f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d |
start_time | string Example: start_time=2022-09-01T14:25:36-07:00 |
end_time | string Example: end_time=2022-09-06T14:25:36-07:00 |
actions | string Example: actions=Create,Update |
actor_ids | string Example: actor_ids=f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d |
actor_emails | string Example: [email protected],[email protected], only support filter by user email, not by crusoe admin email. |
actor_types | string Example: actor_types=User,Crusoe Admin, please ensure URL encoding for values with space. |
target_ids | string Example: target_ids=f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d |
target_types | string Example: target_types=VM,KubernetesCluster |
target_names | string Example: target_names=my_vm1,my_vm2 |
associate_ids | string Example: associate_ids=f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d |
associate_types | string Example: associate_types=VM,KubernetesCluster |
associate_names | string Example: associate_names=instance |
locations | string Example: locations=us-east1,us-northcentral1-a |
statuses | string Example: statuses=OK,Bad Request |
surfaces | string Example: surfaces=Browser,Crusoe Terraform/v0.5.21 please make sure the values are URL encoded. |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "items": [
- {
- "action": "Create",
- "action_detail": "Attach Disk",
- "actor_id": "e384a1de-81f8-4cb2-b312-a7d88a9bf9cb || \"system\"",
- "actor_type": "user || admin || system",
- "client_ip": "10.2.5.355",
- "end_time": "\"2024-08-24T05:25:33.860Z\"",
- "error_message": "\"The requested resource is out of stock. Please try again later.\"",
- "locations": "us-east1",
- "organization_id": "d10efcc0-7dba-4163-a3f0-f48aae20712a",
- "organization_name": "crusoe.ai",
- "project_id": "e384a1de-81f8-4cb2-b312-a7d88a9bf9cb",
- "project_name": "e384a1de-81f8-4cb2-b312-a7d88a9bf9cb",
- "result": "OK",
- "start_time": "\"2024-08-24T05:25:30.954Z\"",
- "surface": "browser",
- "target_ids": "e384a1de-81f8-4cb2-b312-a7d88a9bf9cb,6ac4d027-ee2a-4c0c-9b6f-e8638a7ae867",
- "target_names": "vm-test-1,vm-test-2",
- "target_type": "VM"
}
]
}
Response samples
- 200
- 401
- 500
{
}
Update user details for the logged in user.
A successful response from this resource wil contain the updated user details.
Request Body schema: application/json
name required | string |
role | string |
Responses
Request samples
- Payload
{- "name": "John Doe",
- "role": "Admin"
}
Response samples
- 200
- 401
- 500
{
}
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "created_at": "2022-01-24T20:13:35.328Z",
- "fingerprints": {
- "md5": "bf:60:fa:cc:9f:42:1f:5e:23:9e:ed:d2:69:d8:76:93",
- "sha256": "tARFxQkVHeqm6TzqpI897QsHVdgZlxgL2/YhVltmEUk"
}, - "id": "0b880f48-6a97-408f-8351-3cc30871e010",
- "name": "public key 1",
- "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpuH/fqCFLbAConChyVH6rZzSaxlnHSwQk6qvtPsf5E"
}
]
}
Register a new SSH public key to the logged in user.
A successful response from this resource wil contain the created SSH key details.
Request Body schema: application/json
name required | string |
public_key required | string |
Responses
Request samples
- Payload
{- "name": "John Doe",
- "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpuH/fqCFLbAConChyVH6rZzSaxlnHSwQk6qvtPsf5E"
}
Response samples
- 200
- 400
- 401
- 500
{- "ssh_key": {
- "created_at": "2022-01-24T20:13:35.328Z",
- "fingerprints": {
- "md5": "bf:60:fa:cc:9f:42:1f:5e:23:9e:ed:d2:69:d8:76:93",
- "sha256": "tARFxQkVHeqm6TzqpI897QsHVdgZlxgL2/YhVltmEUk"
}, - "id": "0b880f48-6a97-408f-8351-3cc30871e010",
- "name": "public key 1",
- "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpuH/fqCFLbAConChyVH6rZzSaxlnHSwQk6qvtPsf5E"
}
}
Response samples
- 200
- 401
- 500
{- "items": [
- {
- "access_key": "Hm11C1coQZm2+Aihn9ofYg",
- "alias": "token1",
- "created_at": "2021-11-03T22:16:27Z",
- "expires_at": "2021-12-03T19:58:34Z",
- "last_used": "2021-11-03T22:22:55Z"
}
]
}
Create a new token owned by the logged in user.
A successful response from this resource will contain json-encoded details of API token. This is the only time the customer will be able to view the secret key associated with the token.
Request Body schema: application/json
alias | string |
expires_at required | string |
Responses
Request samples
- Payload
{- "alias": "token1",
- "expires_at": "2021-12-03T19:58:34Z"
}
Response samples
- 200
- 401
- 500
{- "token": {
- "access_key": "R7p5XctCQMuGlpVBmVdqzA",
- "alias": "newtoken",
- "created_at": "2021-11-03T22:16:27Z",
- "expires_at": "2021-12-03T19:58:34Z",
- "secret_key": "HrbZ3VTUb2YNAq53Md1EsA"
}
}
Retrieve details about all disks that belong to the logged in user.
Size of disks will be in gibibytes (GiB)
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "attached_to": [
- {
- "attachment_type": "string",
- "mode": "string",
- "vm_id": "123e4567-e89b-12d3-a456-426614174000"
}
], - "block_size": 4096,
- "created_at": "2021-12-03T19:58:34Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "location": "us-northcentral1-a",
- "name": "my-disk",
- "serial_number": "96FD14FDBCF7E21E8EC",
- "size": "10GiB",
- "type": "persistent-ssd",
- "updated_at": "2021-12-03T19:58:34Z"
}
]
}
Create a new disk owned by the logged in user.
Requires either a disk snapshot ID, or size and location, where size of disk should be in gibibytes (GiB) or tebibytes (TiB) in the format [Size][Unit]. E.g. 10GiB. Disk type must be one of: DISK_TYPE_PERSISTENT_SSD. A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
block_size | integer <int64> |
location | string |
name required | string |
size | string |
snapshot_id | string |
type | string Default: "persistent-ssd" Enum: "persistent-ssd" "shared-volume" |
Responses
Request samples
- Payload
{- "block_size": 4096,
- "location": "us-northcentral1-a",
- "name": "my-disk",
- "size": "10GiB",
- "snapshot_id": "123e4567-e89b-12d3-a456-426614174000",
- "type": "persistent-ssd"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details for a disk that belongs to the logged in user.
Size of disk will be in gibibytes (GiB)
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
disk_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "attached_to": [
- {
- "attachment_type": "string",
- "mode": "string",
- "vm_id": "123e4567-e89b-12d3-a456-426614174000"
}
], - "block_size": 4096,
- "created_at": "2021-12-03T19:58:34Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "location": "us-northcentral1-a",
- "name": "my-disk",
- "serial_number": "96FD14FDBCF7E21E8EC",
- "size": "10GiB",
- "type": "persistent-ssd",
- "updated_at": "2021-12-03T19:58:34Z"
}
Delete a disk owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
disk_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Resize a disk that the logged in user owns.
Size should be in gibibytes (GiB) or tebibytes (TiB) in the format [Size][Unit]. E.g. 10GiB A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
disk_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
size required | string |
Responses
Request samples
- Payload
{- "size": "10GiB"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Get status of asynchronous operations
This resource retrieves information about the status of asynchronous operations initiated by the disks resource. All operations that are either in-flight or completed but not yet queried will be returned.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
]
}
Get status of a single asynchronous operation
This resource retrieves information about the status of an asynchronous operation initiated by the disks resource. Only information about the operation specified in the path will be returned, or an HTTP 403 will be returned if the operation does not exist, was not initiated by the logged in user, or has expired.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
operation_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
Retrieve details about all disk snapshots that belong to the logged in user.
Size of snapshots will be in bytes.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "items": [
- {
- "block_size": 4096,
- "created_at": "2021-12-03T19:58:34Z",
- "created_from": "123e4567-e89b-12d3-a456-426614174000",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "size": "10457 bytes",
- "updated_at": "2021-12-03T19:58:34Z"
}
]
}
Create a new snapshot for a disk owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
disk_id required | string |
Responses
Request samples
- Payload
{- "disk_id": "123e4567-e89b-12d3-a456-426614174000"
}
Response samples
- 200
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details about a disk snapshot that belongs to the logged in user.
Size of snapshot will be in bytes.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
snapshot_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "block_size": 4096,
- "created_at": "2021-12-03T19:58:34Z",
- "created_from": "123e4567-e89b-12d3-a456-426614174000",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "size": "10457 bytes",
- "updated_at": "2021-12-03T19:58:34Z"
}
Delete a disk snapshot owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
snapshot_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Get status of asynchronous operations
This resource retrieves information about the status of asynchronous operations initiated by the snapshots resource. All operations that are either in-flight or completed but not yet queried will be returned.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
]
}
Get status of a single asynchronous operation
This resource retrieves information about the status of an asynchronous operation initiated by the snapshots resource. Only information about the operation specified in the path will be returned, or an HTTP 403 will be returned if the operation does not exist, was not initiated by the logged in user, or has expired.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
operation_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
Retrieve details about all VPC firewall rules that belong to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "action": "allow",
- "destination_ports": "[80, 443, 3000-8080]",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "direction": "ingress",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "name": "my-firewall-rule",
- "protocols": "[tcp, udp]",
- "source_ports": "[80, 443, 3000-8080]",
- "sources": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "state": "active",
- "vpc_network_id": "74927f69-f6f6-43f4-bc0d-7bb2e864250e"
}
]
}
Create a new VPC firewall rule owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
action required | string Enum: "allow" "deny" |
destination_ports | Array of strings |
required | Array of objects (FirewallRuleObject specifies the source or destination of a firewall rule.) |
direction required | string Enum: "ingress" "egress" |
name required | string |
protocols required | Array of strings |
source_ports | Array of strings |
required | Array of objects (FirewallRuleObject specifies the source or destination of a firewall rule.) |
vpc_network_id required | string |
Responses
Request samples
- Payload
{- "action": "allow",
- "destination_ports": "[80, 443, 3000-8080]",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "direction": "ingress",
- "name": "my-firewall-rule",
- "protocols": "[tcp, udp]",
- "source_ports": "[80, 443, 3000-8080]",
- "sources": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "vpc_network_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details for a VPC firewall rule that belongs to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_firewall_rule_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "action": "allow",
- "destination_ports": "[80, 443, 3000-8080]",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "direction": "ingress",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "name": "my-firewall-rule",
- "protocols": "[tcp, udp]",
- "source_ports": "[80, 443, 3000-8080]",
- "sources": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "state": "active",
- "vpc_network_id": "74927f69-f6f6-43f4-bc0d-7bb2e864250e"
}
Delete a VPC firewall rule owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_firewall_rule_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Patch (update) a VPC firewall rule owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_firewall_rule_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
destination_ports | Array of strings |
Array of objects (FirewallRuleObject specifies the source or destination of a firewall rule.) | |
name | string |
protocols | Array of strings |
source_ports | Array of strings |
Array of objects (FirewallRuleObject specifies the source or destination of a firewall rule.) |
Responses
Request samples
- Payload
{- "destination_ports": "[80, 443, 3000-8080]",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "name": "my-firewall-rule",
- "protocols": "[tcp, udp]",
- "source_ports": "[80, 443, 3000-8080]",
- "sources": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
]
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Get status of asynchronous operations
This resource retrieves information about the status of asynchronous operations initiated by the snapshots resource. All operations that are either in-flight or completed but not yet queried will be returned.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
]
}
Get status of a single asynchronous operation
This resource retrieves information about the status of an asynchronous operation initiated by the snapshots resource. Only information about the operation specified in the path will be returned, or an HTTP 403 will be returned if the operation does not exist, was not initiated by the logged in user, or has expired.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
operation_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
Retrieve details about all VPC networks that belong to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "cidr": "121.0.0.0/20",
- "gateway": "11bf5b4c-e0e5-4017-bdb8-3861f3acedc1",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "name": "default-ethernet",
- "subnets": "[1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc]"
}
]
}
Create a new VPC network owned by the logged in user.
A successful response from this resource will contain information regarding the created VPC network.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
cidr required | string |
name required | string |
Responses
Request samples
- Payload
{- "cidr": "172.27.0.0/16",
- "name": "my-cool-vpc-network"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "network": {
- "cidr": "121.0.0.0/20",
- "gateway": "11bf5b4c-e0e5-4017-bdb8-3861f3acedc1",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "name": "default-ethernet",
- "subnets": "[1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc]"
}
}
Retrieve details for a VPC network that belongs to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_network_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "cidr": "121.0.0.0/20",
- "gateway": "11bf5b4c-e0e5-4017-bdb8-3861f3acedc1",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "name": "default-ethernet",
- "subnets": "[1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc]"
}
Delete a VPC network owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_network_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Patch (update) a VPC network owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_network_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
name required | string |
Responses
Request samples
- Payload
{- "name": "my-cool-vpc-network"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details about all VPC subnets that belong to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "cidr": "121.0.0.0/24",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "location": "us-northcentraleast1-a",
- "name": "my-subnet",
- "vpc_network_id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
]
}
Create a new VPC subnet owned by the logged in user.
A successful response from this resource will contain information regarding the created subnet.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
cidr required | string |
location required | string |
name required | string |
vpc_network_id required | string |
Responses
Request samples
- Payload
{- "cidr": "172.27.0.0/16",
- "location": "us-east",
- "name": "my-cool-vpc-subnet",
- "vpc_network_id": "36c0b0d9-8b68-4869-addb-227b06b64ee0"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "subnet": {
- "cidr": "121.0.0.0/24",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "location": "us-northcentraleast1-a",
- "name": "my-subnet",
- "vpc_network_id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
}
Retrieve details for a VPC subnet that belongs to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_subnet_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "cidr": "121.0.0.0/24",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "location": "us-northcentraleast1-a",
- "name": "my-subnet",
- "vpc_network_id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
Delete a VPC subnet owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_subnet_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Patch (update) a VPC subnet owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
vpc_subnet_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
name required | string |
Responses
Request samples
- Payload
{- "name": "my-cool-vpc-subnet"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details about all load balancers that belong to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "algorithm": "random",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "health_check": {
- "failure_count": "3",
- "interval": "60",
- "port": "8080",
- "success_count": "2",
- "timeout": "20"
}, - "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "ips": [
- {
- "private_ipv4": {
- "address": "10.1.2.3"
}, - "public_ipv4": {
- "address": "121.0.0.0",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "type": "dynamic"
}
}
], - "location": "us-northcentraleast1-a",
- "name": "my-subnet",
- "network_interfaces": [
- {
- "network": "dbaafd53-96ea-4754-9cce-78e7f08ac151",
- "subnet": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}
], - "protocols": "[tcp]",
- "type": "internal_ipv4,"
}
]
}
Create a new load balancer owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
algorithm required | string |
required | Array of objects (NetworkTarget) |
object (HealthCheckOptions) | |
location required | string |
name required | string |
required | Array of objects (LoadBalancerNetworkInterface) |
protocols required | Array of strings |
type | string |
Responses
Request samples
- Payload
{- "algorithm": "random",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "health_check": {
- "failure_count": "3",
- "interval": "60",
- "port": "8080",
- "success_count": "2",
- "timeout": "20"
}, - "location": "us-northcentraleast1-a",
- "name": "my-load-balancer",
- "network_interfaces": [
- {
- "network": "dbaafd53-96ea-4754-9cce-78e7f08ac151",
- "subnet": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}
], - "protocols": "[tcp]",
- "type": "internal_ipv4"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Retrieve details for a load balancer that belongs to the logged in user.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
load_balancer_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "algorithm": "random",
- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "health_check": {
- "failure_count": "3",
- "interval": "60",
- "port": "8080",
- "success_count": "2",
- "timeout": "20"
}, - "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "ips": [
- {
- "private_ipv4": {
- "address": "10.1.2.3"
}, - "public_ipv4": {
- "address": "121.0.0.0",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "type": "dynamic"
}
}
], - "location": "us-northcentraleast1-a",
- "name": "my-subnet",
- "network_interfaces": [
- {
- "network": "dbaafd53-96ea-4754-9cce-78e7f08ac151",
- "subnet": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}
], - "protocols": "[tcp]",
- "type": "internal_ipv4,"
}
Delete a load balancer owned by the logged in user.
A successful response from this resource will contain the async operation.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
load_balancer_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Patch (update) a load balancer owned by the logged in user.
A successful response from this resource will contain the async operation. To disable health checking, pass "health_check": {"port": 0}
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
load_balancer_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Request Body schema: application/json
Array of objects (NetworkTarget) | |
object (HealthCheckOptions) | |
name | string |
Responses
Request samples
- Payload
{- "destinations": [
- {
- "cidr": "10.1.2.3/24",
- "resource_id": "306aa10d-5570-4e47-88c9-46bf11bd8737"
}
], - "health_check": {
- "failure_count": "3",
- "interval": "60",
- "port": "8080",
- "success_count": "2",
- "timeout": "20"
}, - "name": "my-load-balancer"
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operation": {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
}
Get status of asynchronous operations
This resource retrieves information about the status of asynchronous operations initiated by the Load Balancers resource. All operations that are either in-flight or completed but not yet queried will be returned.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "items": [
- {
- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
]
}
Get status of a single asynchronous operation
This resource retrieves information about the status of an asynchronous operation initiated by the Load Balancer resource. Only information about the operation specified in the path will be returned, or an HTTP 403 will be returned if the operation does not exist, was not initiated by the logged in user, or has expired.
path Parameters
project_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
operation_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "completed_at": "2021-12-03T19:59:34Z",
- "metadata": { },
- "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
- "result": { },
- "started_at": "2021-12-03T19:58:34Z",
- "state": "IN_PROGRESS"
}
Lists available Crusoe Cloud capacity with optional filters on location and product name.
query Parameters
product_name | Array of strings Example: product_name=[a100.1x, a100.2x] |
location | Array of strings Example: location=[us-northcentral1-a, us-northcentral1-b] |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "items": [
- {
- "location": "us-east",
- "quantity": 8,
- "type": "a100.2x"
}
]
}