GET
/repos/{owner}/{repo}/codespaces/machinesList 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.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
locationstringoptional
The location to check for available machines. Assigned by IP if not provided.
client_ipstringoptional
IP for location auto-detection when proxying a request
refstringoptional
The branch or commit to check for prebuild availability and devcontainer restrictions.
200Response
total_countintegerrequired
machinesarray<CodespaceMachine>required
304Not modified
401Requires authentication
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
500Internal Error
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
Error handling
A 401 is returned: Requires authentication. A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 500 is returned: Internal Error.