Skip to main content

codespaces

Overview

Namecodespaces
TypeResource
Idgithub.codespaces.codespaces

Fields

NameDatatypeDescription
idinteger
namestringAutomatically generated name of this codespace.
repositoryobjectMinimal Repository
prebuildbooleanWhether the codespace was created from a prebuild.
updated_atstring
billable_ownerobjectSimple User
locationstringThe Azure region where this codespace is located.
created_atstring
display_namestringDisplay name for this codespace.
statestringState of this codespace.
machineobjectA description of the machine powering a codespace.
last_used_atstringLast known time this codespace was started.
ownerobjectSimple User
urlstringAPI URL for this codespace.
pulls_urlstringAPI URL for the Pull Request associated with this codespace, if any.
start_urlstringAPI URL to start this codespace.
web_urlstringURL to access this codespace on the web.
environment_idstringUUID identifying this codespace's environment.
git_statusobjectDetails about the codespace's git repository.
idle_timeout_minutesintegerThe number of minutes of inactivity after which this codespace will be automatically stopped.
machines_urlstringAPI URL to access available alternate machine types for this codespace.
recent_foldersarray
stop_urlstringAPI URL to stop this codespace.
runtime_constraintsobject

Methods

NameAccessible byRequired ParamsDescription
get_for_authenticated_userSELECTcodespace_nameGets information about a user's codespace.

You must authenticate using an access token with the codespace scope to use this endpoint.
list_for_authenticated_userSELECTLists the authenticated user's codespaces.

You must authenticate using an access token with the codespace scope to use this endpoint.
list_in_repository_for_authenticated_userSELECTowner, repoLists the codespaces associated to a specified repository and the authenticated user.

You must authenticate using an access token with the codespace scope to use this endpoint.
create_for_authenticated_userINSERTCreates a new codespace, owned by the authenticated user.

This endpoint requires either a repository_id OR a pull_request but not both.

You must authenticate using an access token with the codespace scope to use this endpoint.
create_with_pr_for_authenticated_userINSERTowner, pull_number, repo, data__locationCreates a codespace owned by the authenticated user for the specified pull request.

You must authenticate using an access token with the codespace scope to use this endpoint.
create_with_repo_for_authenticated_userINSERTowner, repo, data__locationCreates a codespace owned by the authenticated user in the specified repository.

You must authenticate using an access token with the codespace scope to use this endpoint.
delete_for_authenticated_userDELETEcodespace_nameDeletes a user's codespace.

You must authenticate using an access token with the codespace scope to use this endpoint.
export_for_authenticated_userEXECcodespace_nameTriggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.

You must authenticate using a personal access token with the codespace scope to use this endpoint.
get_export_details_for_authenticated_userEXECcodespace_name, export_idGets information about an export of a codespace.

You must authenticate using a personal access token with the codespace scope to use this endpoint.
start_for_authenticated_userEXECcodespace_nameStarts a user's codespace.

You must authenticate using an access token with the codespace scope to use this endpoint.
stop_for_authenticated_userEXECcodespace_nameStops a user's codespace.

You must authenticate using an access token with the codespace scope to use this endpoint.
update_for_authenticated_userEXECcodespace_nameUpdates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.

If you specify a new machine type it will be applied the next time your codespace is started.

You must authenticate using an access token with the codespace scope to use this endpoint.