Crusoe Cloud API Gateway (v1alpha4)
Download OpenAPI specification:Download
The API Gateway exposes all publicly available API endpoints for Crusoe Cloud products.
Response samples
- 200
- 401
- 500
{- "instances": [
- {
- "commitment_end": "2021-12-03T19:58:34Z",
- "commitment_period": 6,
- "created_at": "2021-12-03T19:58:34Z",
- "disks": [
- {
- "attached_to": [
- {
- "attachment_type": "disk-os",
- "vm_id": "123e4567-e89b-12d3-a456-426614174000"
}
], - "created_at": "2021-12-03T19:58:34Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "is_boot_disk": true,
- "location": "us-northcentral1-a",
- "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",
- "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"
}
], - "product_name": "a100.2x",
- "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "ssh_destination": "12.21.12.21:22",
- "state": "RUNNING"
}
]
}
Create a new VM instance owned by the logged in user.
Request Body schema: application/json
commitment_period | integer <int64> |
disks | Array of strings |
ib_partition_id | string |
image | string |
image_checksum | string |
image_id | string |
location | string |
name required | string |
product_name required | string |
role_id required | string |
shutdown_script | string |
ssh_public_key required | string |
startup_script | string |
Responses
Request samples
- Payload
{- "commitment_period": 6,
- "disks": [
- "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "123e4567-e89b-12d3-a456-426614174000"
], - "ib_partition_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "image": "ubuntu:20.04",
- "image_checksum": "120EA8A25E5D487BF68B5F7096440019",
- "image_id": "9f161e28-b629-442c-951c-77c68199f36e",
- "location": "us-northcentral1-a",
- "name": "my-first-vm",
- "product_name": "a100.2x",
- "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "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'\""
}
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"
}
}
Response samples
- 200
- 400
- 401
- 403
- 500
{- "instance": {
- "commitment_end": "2021-12-03T19:58:34Z",
- "commitment_period": 6,
- "created_at": "2021-12-03T19:58:34Z",
- "disks": [
- {
- "attached_to": [
- {
- "attachment_type": "disk-os",
- "vm_id": "123e4567-e89b-12d3-a456-426614174000"
}
], - "created_at": "2021-12-03T19:58:34Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "is_boot_disk": true,
- "location": "us-northcentral1-a",
- "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",
- "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"
}
], - "product_name": "a100.2x",
- "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "ssh_destination": "12.21.12.21:22",
- "state": "RUNNING"
}
}
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
vm_id required | string |
Request Body schema: application/json
action required | string |
commitment_period | integer <int64> |
product_name | string |
Responses
Request samples
- Payload
{- "action": "START",
- "commitment_period": 6,
- "product_name": "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
vm_id required | string |
Request Body schema: application/json
attach_disks required | Array of strings |
Responses
Request samples
- Payload
{- "attach_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"
}
}
Detach disks from a VM the logged in user owns.
path Parameters
vm_id required | string |
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 to purchase along with their prices.
Responses
Response samples
- 200
- 401
- 500
{- "vm_types": [
- {
- "cpu_cores": 4,
- "cpu_type": "intel",
- "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.
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=OPERATION_STATE_IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operations": [
- {
- "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
operation_id required | string |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operations": [
- {
- "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
- 400
- 401
- 404
- 500
{- "created_at": "2023-06-29T20:03:26Z",
- "description": "base Ubuntu 20.04 image",
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "\"ubuntu\"",
- "tags": "[20.4, latest]"
}
Retrieve details about roles that the logged in user belongs to or owns.
If querying for roles 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 |
Responses
Response samples
- 200
- 401
- 500
{- "roles": [
- {
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
]
}
Update details for a role 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 role. Currently only the role's name can be changed.
query Parameters
role_id required | string Example: role_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
{- "role": {
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
}
Create a new role that will be owned by the logged in user.
The logged in user must have the permission to create roles within the organization. A successful response from this resource contains details of the created role.
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
{- "role": {
- "id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "name": "Admin",
- "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab",
- "relation": "owner"
}
}
Delete a role that the logged in user owns.
Delete operations cascade to VMs created under that role.
query Parameters
role_id required | string Example: role_id=f058d0db-2fa4-4cf2-8cf1-dfbcfe05a814 |
Responses
Response samples
- 401
- 403
- 500
{- "code": "401",
- "message": "bad_credential"
}
Response samples
- 200
- 401
- 500
{- "entities": [
- {
- "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"
}
]
}
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"
}
}
Create a new organization owned by the logged in user.
A successful response from this resource will contain the json encoded organization details.
Request Body schema: application/json
organization_name required | string |
Responses
Request samples
- Payload
{- "organization_name": "Crusoe Energy"
}
Response samples
- 200
- 401
- 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"
}
}
Delete an organization owned by the logged in user.
Delete operations will cascade to roles and VMs, and all members will be removed from the organization.
query Parameters
org_id required | string Example: org_id=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 401
- 403
- 500
{- "code": "401",
- "message": "bad_credential"
}
Create a new prospective customer in Crusoe Cloud.
Request Body schema: application/json
company required | string |
email required | string |
name required | string |
source required | string |
use_case required | string |
Responses
Request samples
- Payload
{- "company": "crusoe",
- "name": "john",
- "source": "portal",
- "use_case": "training model to minimize energy usage"
}
Response samples
- 200
- 400
- 500
{- "success": true
}
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
{- "ssh_keys": [
- {
- "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
{- "tokens": [
- {
- "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)
Responses
Response samples
- 200
- 401
- 403
- 500
{- "disks": [
- {
- "attached_to": [
- {
- "attachment_type": "disk-os",
- "vm_id": "123e4567-e89b-12d3-a456-426614174000"
}
], - "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.
Request Body schema: application/json
location | string |
name required | string |
role_id required | string |
size | string |
snapshot_id | string |
type required | string |
Responses
Request samples
- Payload
{- "location": "us-northcentral1-a",
- "name": "my-disk",
- "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "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
disk_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "disks": [
- {
- "attached_to": [
- {
- "attachment_type": "disk-os",
- "vm_id": "123e4567-e89b-12d3-a456-426614174000"
}
], - "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
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
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.
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=OPERATION_STATE_IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operations": [
- {
- "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
operation_id required | string |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operations": [
- {
- "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.
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "disk_snapshots": [
- {
- "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.
Request Body schema: application/json
disk_id required | string |
role_id required | string |
Responses
Request samples
- Payload
{- "disk_id": "123e4567-e89b-12d3-a456-426614174000",
- "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}
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
snapshot_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "disk_snapshots": [
- {
- "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
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.
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=OPERATION_STATE_IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operations": [
- {
- "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
operation_id required | string |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operations": [
- {
- "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
- 403
- 500
{- "firewall_rules": [
- {
- "action": "allow",
- "destination_ports": "[80, 443, 3000-8080]",
- "destinations": [
- {
- "cidr": "10.1.2.3/24"
}
], - "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"
}
], - "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.
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 |
role_id required | string |
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"
}
], - "direction": "ingress",
- "name": "my-firewall-rule",
- "protocols": "[tcp, udp]",
- "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
- "source_ports": "[80, 443, 3000-8080]",
- "sources": [
- {
- "cidr": "10.1.2.3/24"
}
], - "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
vpc_firewall_rule_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "firewall_rules": [
- {
- "action": "allow",
- "destination_ports": "[80, 443, 3000-8080]",
- "destinations": [
- {
- "cidr": "10.1.2.3/24"
}
], - "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"
}
], - "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
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
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"
}
], - "name": "my-firewall-rule",
- "protocols": "[tcp, udp]",
- "source_ports": "[80, 443, 3000-8080]",
- "sources": [
- {
- "cidr": "10.1.2.3/24"
}
]
}
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.
query Parameters
resource_id | string Example: resource_id=452580d7-41d1-4b63-b4d7-4e4e21e95f96 |
state | Array of strings Example: state=OPERATION_STATE_IN_PROGRESS |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "operations": [
- {
- "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
operation_id required | string |
Responses
Response samples
- 200
- 400
- 401
- 403
- 500
{- "operations": [
- {
- "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
- 403
- 500
{- "networks": [
- {
- "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
vpc_network_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "networks": [
- {
- "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]"
}
]
}
Response samples
- 200
- 401
- 403
- 500
{- "subnets": [
- {
- "cidr": "121.0.0.0/24",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "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
vpc_subnet_id required | string Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab |
Responses
Response samples
- 200
- 401
- 403
- 500
{- "subnets": [
- {
- "cidr": "121.0.0.0/24",
- "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
- "name": "my-subnet",
- "vpc_network_id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}
]
}
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
{- "capacities": [
- {
- "location": "us-east",
- "product_name": "a100.2x",
- "quantity": 8
}
]
}