Skip to main content

Crusoe Cloud API Gateway (v1alpha5)

Download OpenAPI specification:Download

The API Gateway exposes all publicly available API endpoints for Crusoe Cloud products.

VMs

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

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

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>
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)
shutdown_script
string
ssh_public_key
required
string
startup_script
string
type
required
string

Responses

Request samples

Content type
application/json
{
  • "commitment_period": 6,
  • "disks": "[{disk_id: \"09ae8411-0fbb-411c-898c-2b8f19622ae1\", mode: \"read-write\", attach_type: \"data\"},",
  • "host_channel_adapters": [
    ],
  • "image": "ubuntu:20.04",
  • "location": "us-northcentral1-a",
  • "name": "my-first-vm",
  • "network_interfaces": [
    ],
  • "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"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "commitment_end": "2021-12-03T19:58:34Z",
  • "commitment_period": 6,
  • "created_at": "2021-12-03T19:58:34Z",
  • "disks": [
    ],
  • "host_channel_adapters": [
    ],
  • "id": "ca39e669-47ee-456b-968d-303234fbf99f",
  • "location": "us-centralnorth1-a",
  • "name": "my-first-vm",
  • "network_interfaces": [
    ],
  • "project_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
  • "ssh_destination": "12.21.12.21:22",
  • "state": "RUNNING",
  • "type": "a100.2x",
  • "updated_at": "2023-08-14T09:00:35Z"
}

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

Content type
application/json
{
  • "operation": {
    }
}

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" "COMMIT" "UPDATE"
commitment_period
integer <int64>
Array of objects (PartialHostChannelAdapter is used when POSTing and PATCHing VMs to assign IB Partitions.)
Array of objects (NetworkInterface)
type
string

Responses

Request samples

Content type
application/json
{
  • "action": "START",
  • "commitment_period": 6,
  • "host_channel_adapters": [
    ],
  • "network_interfaces": [
    ],
  • "type": "a100.2x"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

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)

nolint:lll // DiskAttachment objects are large

Array
attachment_type
required
string
Enum: "os" "data"
disk_id
required
string
mode
required
string
Enum: "read-only" "read-write"

Responses

Request samples

Content type
application/json
{
  • "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

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "detach_disks": [
    ]
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

Retrieve information about the types of VMs that are available to purchase along with their prices.

path Parameters
project_id
required
string
Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

VM-Operations

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

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "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"
}

Images

Lists all VM images available for use.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Retrieve details about a VM image.

path Parameters
image_id
required
string
Example: ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab

Responses

Response samples

Content type
application/json
{
  • "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]"
}

Projects

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "name": "Crusoe Energy"
}

Response samples

Content type
application/json
{
  • "project": {
    }
}

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

Content type
application/json
{
  • "name": "Admin",
  • "organization_id": "ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab"
}

Response samples

Content type
application/json
{
  • "project": {
    }
}

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "code": "401",
  • "message": "bad_credential"
}

Billing

Retrieve an intent to facilitate a Stripe action.

query Parameters
org_id
required
string
Example: org_id=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
intent_type
required
string
Value: "dashboard"

Responses

Response samples

Content type
application/json

Entities

Retrieve details about all active organizations the logged in user belongs to.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "organization_name": "Crusoe Energy"
}

Response samples

Content type
application/json
{
  • "entity": {
    }
}

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

Content type
application/json
{
  • "organization_name": "Crusoe Energy"
}

Response samples

Content type
application/json
{
  • "entity": {
    }
}

Delete an organization owned by the logged in user.

Delete operations will cascade to projects 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

Content type
application/json
{
  • "code": "401",
  • "message": "bad_credential"
}

Prospects

Create a new prospective customer in Crusoe Cloud.

Request Body schema: application/json
company
required
string
email
required
string
expected_capacity
required
string
Enum: "<64 GPUs" "64-128 GPUs" "128-256 GPUs" "256+ GPUs"
expected_commitment
required
string
Enum: "On-demand" "1 year" "2 year" "3 year"
name
required
string
referral
required
string
source
required
string
use_case
required
string

Responses

Request samples

Content type
application/json
{
  • "company": "crusoe",
  • "email": "[email protected]",
  • "expected_capacity": "<64 GPUs",
  • "expected_commitment": "1 year",
  • "name": "john",
  • "referral": "marketing event",
  • "source": "portal",
  • "use_case": "training model to minimize energy usage"
}

Response samples

Content type
application/json
{
  • "success": true
}

Usage

Get project-level usage for products in Crusoe Cloud.

query Parameters
org_id
required
string
Example: org_id=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
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

Content type
application/json
{
  • "items": [
    ]
}

Get resource-level usage for products in Crusoe Cloud.

query Parameters
org_id
required
string
Example: org_id=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab
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

Content type
application/json
{
  • "code": "400",
  • "message": "bad_request"
}

Get options which exist for filters for /usage and /usage/export routes.

query Parameters
org_id
required
string
Example: org_id=ab4a6b00-aa5f-408e-a9fb-ac6de5eb45ab

Responses

Response samples

Content type
application/json
{
  • "end_date": "\"2023-08-08\"",
  • "projects": [
    ],
  • "regions": [
    ],
  • "resource_types": [
    ],
  • "start_date": "\"2022-07-01\""
}

Identities

Retrieve user details for the logged in user.

Responses

Response samples

Content type
application/json
{}

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

Content type
application/json
{
  • "name": "John Doe",
  • "role": "Admin"
}

Response samples

Content type
application/json
{}

Delete the account for the logged in user.

Delete operations will cascade to all entities the user owns (organizations, roles, vms).

Responses

Response samples

Content type
application/json
{
  • "code": "401",
  • "message": "bad_credential"
}

SSH-Keys

Retrieve the list of SSH public keys registered to the logged in user.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "name": "John Doe",
  • "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICpuH/fqCFLbAConChyVH6rZzSaxlnHSwQk6qvtPsf5E"
}

Response samples

Content type
application/json
{
  • "ssh_key": {
    }
}

Delete an SSH public key registered to the logged in user.

query Parameters
id
required
string
Example: id=6e28cad3-98e6-47a9-a9fc-1cd83a7f25c1

Responses

Response samples

Content type
application/json
{
  • "code": "400",
  • "message": "bad_request"
}

Tokens

Retrieve all active/expired API tokens for the logged in user.

Responses

Response samples

Content type
application/json
{
  • "tokens": [
    ]
}

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

Content type
application/json
{
  • "alias": "token1",
  • "expires_at": "2021-12-03T19:58:34Z"
}

Response samples

Content type
application/json
{
  • "token": {
    }
}

Delete an API token owned by the logged in user.

query Parameters
access_key
required
string
Example: access_key=WTUzcGibQ82y9_01h4MCdQ

Responses

Response samples

Content type
application/json
{
  • "code": "401",
  • "message": "bad_credential"
}

Disks

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

Content type
application/json
{
  • "items": [
    ]
}

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
required
string

Responses

Request samples

Content type
application/json
{
  • "block_size": 4096,
  • "location": "us-northcentral1-a",
  • "name": "my-disk",
  • "size": "10GiB",
  • "snapshot_id": "123e4567-e89b-12d3-a456-426614174000",
  • "type": "persistent-ssd"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "attached_to": [
    ],
  • "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

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "size": "10GiB"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

Disk-Operations

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "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"
}

Snapshots

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

Content type
application/json
{
  • "items": [
    ]
}

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
role_id
required
string

Responses

Request samples

Content type
application/json
{
  • "disk_id": "123e4567-e89b-12d3-a456-426614174000",
  • "role_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "operation": {
    }
}

Snapshot-Operations

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "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"
}

VPC-Firewall-Rules

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "action": "allow",
  • "destination_ports": "[80, 443, 3000-8080]",
  • "destinations": [
    ],
  • "direction": "ingress",
  • "name": "my-firewall-rule",
  • "protocols": "[tcp, udp]",
  • "source_ports": "[80, 443, 3000-8080]",
  • "sources": [
    ],
  • "vpc_network_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "action": "allow",
  • "destination_ports": "[80, 443, 3000-8080]",
  • "destinations": [
    ],
  • "direction": "ingress",
  • "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
  • "name": "my-firewall-rule",
  • "protocols": "[tcp, udp]",
  • "source_ports": "[80, 443, 3000-8080]",
  • "sources": [
    ],
  • "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

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "destination_ports": "[80, 443, 3000-8080]",
  • "destinations": [
    ],
  • "name": "my-firewall-rule",
  • "protocols": "[tcp, udp]",
  • "source_ports": "[80, 443, 3000-8080]",
  • "sources": [
    ]
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

VPC-Firewall-Rule-Operations

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "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"
}

VPC-Networks

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "cidr": "172.27.0.0/16",
  • "name": "my-cool-vpc-network"
}

Response samples

Content type
application/json
{
  • "network": {
    }
}

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "name": "my-cool-vpc-network"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

VPC-Subnets

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "cidr": "172.27.0.0/16",
  • "location": "us-east",
  • "name": "my-cool-vpc-subnet",
  • "vpc_network_id": "36c0b0d9-8b68-4869-addb-227b06b64ee0"
}

Response samples

Content type
application/json
{
  • "subnet": {
    }
}

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

Content type
application/json
{
  • "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

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "name": "my-cool-vpc-subnet"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

Load-Balancers

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

Content type
application/json
{
  • "items": [
    ]
}

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
protocols
required
Array of strings
type
string
vpc_subnet_id
required
string

Responses

Request samples

Content type
application/json
{
  • "algorithm": "random",
  • "destinations": [
    ],
  • "health_check": {
    },
  • "location": "us-northcentraleast1-a",
  • "name": "my-load-balancer",
  • "protocols": "[tcp]",
  • "type": "internal_ipv4",
  • "vpc_subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

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

Content type
application/json
{
  • "algorithm": "random",
  • "destinations": [
    ],
  • "health_check": {
    },
  • "id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc",
  • "ips": [
    ],
  • "location": "us-northcentraleast1-a",
  • "name": "my-subnet",
  • "protocols": "[tcp]",
  • "type": "internal_ipv4,",
  • "vpc_subnet_id": "1ce839b7-3fab-46f9-8e54-7a6bb4ac1ffc"
}

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

Content type
application/json
{
  • "operation": {
    }
}

Patch (update) 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
Request Body schema: application/json
Array of objects (NetworkTarget)
object (HealthCheckOptions)
name
string

Responses

Request samples

Content type
application/json
{
  • "destinations": [
    ],
  • "health_check": {
    },
  • "name": "my-load-balancer"
}

Response samples

Content type
application/json
{
  • "operation": {
    }
}

Load-Balancer-Operations

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

Content type
application/json
{
  • "items": [
    ]
}

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

Content type
application/json
{
  • "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"
}

Locations

Lists all Crusoe Cloud locations usable for resource hosting.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Capacities

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

Content type
application/json
{
  • "items": [
    ]
}