v58

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-061,4651,08313.3 MB
codespaces

List available machine types for a repository

List the machine types available for a given repository based on its configuration.

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

get/repos/{owner}/{repo}/codespaces/machines

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Query parameters

locationstring
Example:WestUs2

The location to check for available machines. Assigned by IP if not provided.

client_ipstring

IP for location auto-detection when proxying a request

refstring
Example:main

The branch or commit to check for prebuild availability and devcontainer restrictions.

Response

Response

total_countinteger required

Example response

{
  "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,
      "prebuild_availability": "ready"
    }
  ]
}