Github API - Test Config

POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces
codespaces
repos

Creates 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.

GitHub Apps must have write access to the codespaces repository permission to use this endpoint.
Create a codespace from a pull request

Arguments
key owner

owner [scalar]

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

API:
Github Open API
(version: 1.1.4)

key repo

repo [scalar]

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

API:
Github Open API
(version: 1.1.4)

key pull-number

pull-number [scalar]

The number that identifies the pull request.

API:
Github Open API
(version: 1.1.4)

Returns
201 application/json codespace

codespace [object]

A codespace.

Attributes
billable_owner simple-user

created_at string

devcontainer_path string

Path to devcontainer.json from repo root used to create Codespace.

display_name string

Display name for this codespace.

environment_id string

UUID identifying this codespace's environment.

git_status 1942

Details about the codespace's git repository.

id integer

idle_timeout_minutes integer

The number of minutes of inactivity after which this codespace will be automatically stopped.

idle_timeout_notice string

Text to show user when codespace idle timeout minutes has been overriden by an organization policy

last_known_stop_notice string

The text to display to a user when a codespace has been stopped for a potentially actionable reason.

last_used_at string

Last known time this codespace was started.

location string

The Azure region where this codespace is located.

machines_url string

API URL to access available alternate machine types for this codespace.

name string

Automatically generated name of this codespace.

owner simple-user

pending_operation boolean

Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it.

pending_operation_disabled_reason string

Text to show user when codespace is disabled by a pending operation

prebuild boolean

Whether the codespace was created from a prebuild.

publish_url string

API URL to publish this codespace to a new repository.

pulls_url string

API URL for the Pull Request associated with this codespace, if any.

recent_folders string []

repository minimal-repository

retention_expires_at string

When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at"

retention_period_minutes integer

Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).

runtime_constraints 1943

start_url string

API URL to start this codespace.

state string

State of this codespace.

stop_url string

API URL to stop this codespace.

updated_at string

url string

API URL for this codespace.

web_url string

URL to access this codespace on the web.

API:
Github Open API
(version: 1.1.4)
202 application/json codespace

codespace [object]

A codespace.

Attributes
billable_owner simple-user

created_at string

devcontainer_path string

Path to devcontainer.json from repo root used to create Codespace.

display_name string

Display name for this codespace.

environment_id string

UUID identifying this codespace's environment.

git_status 1942

Details about the codespace's git repository.

id integer

idle_timeout_minutes integer

The number of minutes of inactivity after which this codespace will be automatically stopped.

idle_timeout_notice string

Text to show user when codespace idle timeout minutes has been overriden by an organization policy

last_known_stop_notice string

The text to display to a user when a codespace has been stopped for a potentially actionable reason.

last_used_at string

Last known time this codespace was started.

location string

The Azure region where this codespace is located.

machines_url string

API URL to access available alternate machine types for this codespace.

name string

Automatically generated name of this codespace.

owner simple-user

pending_operation boolean

Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it.

pending_operation_disabled_reason string

Text to show user when codespace is disabled by a pending operation

prebuild boolean

Whether the codespace was created from a prebuild.

publish_url string

API URL to publish this codespace to a new repository.

pulls_url string

API URL for the Pull Request associated with this codespace, if any.

recent_folders string []

repository minimal-repository

retention_expires_at string

When a codespace will be auto-deleted based on the "retention_period_minutes" and "last_used_at"

retention_period_minutes integer

Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).

runtime_constraints 1943

start_url string

API URL to start this codespace.

state string

State of this codespace.

stop_url string

API URL to stop this codespace.

updated_at string

url string

API URL for this codespace.

web_url string

URL to access this codespace on the web.

API:
Github Open API
(version: 1.1.4)
401 requires_authentication

requires_authentication [scalar]

Requires authentication

API:
Github Open API
(version: 1.1.4)
403 forbidden

forbidden [scalar]

Forbidden

API:
Github Open API
(version: 1.1.4)
404 not_found

not_found [scalar]

Resource not found

API:
Github Open API
(version: 1.1.4)
503 service_unavailable

service_unavailable [scalar]

Service unavailable

API:
Github Open API
(version: 1.1.4)
API:
Github Open API
(version: 1.1.4)