| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use the REST API to manage availability of machine types for a codespace.
You can determine which machine types are available to create a codespace, either on a given repository or as an authenticated user. For more information, see Changing the machine type for your codespace.
You can also use this information when changing the machine of an existing codespace by updating its machine property. The machine update will take place the next time the codespace is restarted. For more information, see Changing the machine type for your codespace.
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.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
owner string Required The account owner of the repository. The name is not case sensitive. |
repo string Required The name of the repository without the .git extension. The name is not case sensitive. |
| Name, Type, Description |
|---|
location string The location to check for available machines. Assigned by IP if not provided. |
client_ip string IP for location auto-detection when proxying a request |
ref string The branch or commit to check for prebuild availability and devcontainer restrictions. |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
| 500 | Internal Error |
Response
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.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
codespace_name string Required The name of the codespace. |
| Status code | Description |
|---|---|
| 200 | OK |
| 304 | Not modified |
| 401 | Requires authentication |
| 403 | Forbidden |
| 404 | Resource not found |
| 500 | Internal Error |
Response
| Back | FazBrowse Home | New Git URL |