Instances

Endpoints related to managing a container's instances, including connecting to the console and credentials for SSH.

List Instances

Requires the containers-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the container this instance is created from.

query Parameters
include
Array of strings

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Items Enum: "creators" "servers" "locations" "integrations" "containers" "environments"
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a list of Container Instances.

default

General error response from the platform

get/v1/containers/{containerId}/instances
Response samples
application/json
{
  • "data": [
    ],
  • "includes": {
    }
}

Create Instances

Manually create Instances of a Container.

Requires the containers-update capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the Container this Instance is created from.

Request Body schema: application/json
Array
server_id
required
string

The ID of the Server the new Instance(s) should be deployed to.

new_instances
required
integer

The number of new Instances to be created on the given Server.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

post/v1/containers/{containerId}/instances
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "data": {
    }
}

Delete Container Instance(s)

Manually delete Instances of a Container.

Requires the containers-update capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the container the instance(s) were created from.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

delete/v1/containers/{containerId}/instances
Response samples
application/json
{
  • "data": {
    }
}

Get Instance

Requires the containers-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the container instance.

query Parameters
include
Array of strings

A comma separated list of include values. Included resources will show up under the root document's include field, with the key being the id of the included resource. In the case of applying an include to a collection of resources, if two resources share the same include, it will only appear once in the return.

Items Enum: "creators" "servers" "locations" "integrations" "containers" "environments"
Responses
200

Returns a Container Instance.

default

General error response from the platform

get/v1/containers/{containerId}/instances/{instanceId}
Response samples
application/json
{
  • "data": {
    },
  • "includes": {
    }
}

Delete Container Instance

Requires the containers-update capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the container instance.

Responses
202

Returns a Job Descriptor.

default

General error response from the platform

delete/v1/containers/{containerId}/instances/{instanceId}
Response samples
application/json
{
  • "data": {
    }
}

Generate Instance SSH Credentials

Generates credentials for connecting to an Instance via SSH. The generated endpoint/secret can be used to log in via SSH into the Instance without exposing ports on the container or host.

Requires the containers-ssh capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the container instance.

Responses
200

Returns an SSH connection response.

default

General error response from the platform

get/v1/containers/{containerId}/instances/{instanceId}/ssh
Response samples
application/json
{
  • "data": {
    }
}

Expire SSH Credentials

Instantly expires any SSH credentials generated for this Instance.

Requires the containers-ssh capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the container instance.

Responses
200

Returns the number of tokens removed.

default

General error response from the platform

delete/v1/containers/{containerId}/instances/{instanceId}/ssh
Response samples
application/json
{
  • "data": {
    }
}

Create Instance Job

Used to perform different actions on a given Container Instance. Can be used to migrate or undo a migration of a Container Instance.

Requires the containers-instance-migrate capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the container instance.

Request Body schema: application/json

Parameters for creating a new container instance job.

action
required
string

The name of the action to perform.

required
object
Responses
202

Returns a Job Descriptor.

default

General error response from the platform

post/v1/containers/{containerId}/instances/{instanceId}/tasks
Request samples
application/json
{
  • "action": "migration.start",
  • "contents": {
    }
}
Response samples
application/json
{
  • "data": {
    }
}

List Instance Volumes

Requires the containers-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested Container.

instanceId
required
string

The ID for the Container Instance.

query Parameters
sort
Array of strings

An array of sort values. To sort descending, put a - in front of the value, e.g. -id.

object

In a list return, the data associated with the page number and size returned. 20 results per page, page 2 would be page[size]=20&page[number]=2

Responses
200

Returns a list of Container Instance Volumes.

default

General error response from the platform

get/v1/containers/{containerId}/instances/{instanceId}/volumes
Response samples
application/json
{
  • "data": [
    ]
}

Get Instance Telemetry Report

Retrieves a point-in-time report of an Instance's resource usage (CPU, RAM, Network, Storage, etc).

Requires the containers-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the container instance.

query Parameters
object

Filter Field

The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for.

Responses
200

Returns an Instance telemetry report.

default

General error response from the platform

get/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/report
Response samples
application/json
{
  • "data": {
    }
}

Instance Telemetry Stream Authorization

Retrieves an access token and URL to open a websocket to for streaming instance telemetry live. This connects directly to the compute layer on the server the instance is hosted on, and streams telemetry in real time.

Requires the containers-view capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID of the requested container.

instanceId
required
string

The ID for the Container Instance.

Responses
200

Returns credentials for connecting to an instance telemetry stream.

default

General error response from the platform

get/v1/containers/{containerId}/instances/{instanceId}/telemetry/resources/stream
Response samples
application/json
{
  • "data": {
    }
}

Instance Console Stream Authorization

Returns the authorization information necessary to connect to a Container Instance's console. To connect via WebSocket, use the returned address, and append the returned token as a URL parameter: <address>?token=<token>.

Requires the containers-console capability.

SecuritybearerAuth and hubAuth
Request
path Parameters
containerId
required
string

The ID for the Container

instanceId
required
string

The ID of the Instance.

Responses
200

Returns authorization information necessary for accessing a Container Instance's console.

default

General error response from the platform

get/v1/containers/{containerId}/instances/{instanceId}/console
Response samples
application/json
{
  • "data": {
    }
}