Skip to content

List machine types for a codespace

GET
/user/codespaces/{codespace_name}/machines

List the machine types a codespace can transition to use.

OAuth app tokens and personal access tokens (classic) need the codespace scope to use this endpoint.

API method documentation

codespace_name
required
string

The name of the codespace.

Response

Media type application/json
object
total_count
required
integer
machines
required
Array<object>
Codespace machine

A description of the machine powering a codespace.

object
name
required

The name of the machine.

string
display_name
required

The display name of the machine includes cores, memory, and storage.

string
operating_system
required

The operating system of the machine.

string
storage_in_bytes
required

How much storage is available to the codespace.

integer
memory_in_bytes
required

How much memory is available to the codespace.

integer
cpus
required

How many cores are available to the codespace.

integer
prebuild_availability
required

Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be “null” if prebuilds are not supported or prebuild availability could not be determined. Value will be “none” if no prebuild is available. Latest values “ready” and “in_progress” indicate the prebuild availability status.

string
nullable
Allowed values: none ready in_progress
Examples
Example default
{
"total_count": 2,
"machines": [
{
"name": "standardLinux",
"display_name": "4 cores, 16 GB RAM, 64 GB storage",
"operating_system": "linux",
"storage_in_bytes": 68719476736,
"memory_in_bytes": 17179869184,
"cpus": 4
},
{
"name": "premiumLinux",
"display_name": "8 cores, 32 GB RAM, 64 GB storage",
"operating_system": "linux",
"storage_in_bytes": 68719476736,
"memory_in_bytes": 34359738368,
"cpus": 8
}
]
}

Not modified

Requires authentication

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Internal Error

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}