Skip to content

Get details about a codespace export

GET
/user/codespaces/{codespace_name}/exports/{export_id}

Gets information about an export of a codespace.

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

API method documentation

codespace_name
required
string

The name of the codespace.

export_id
required
string

The ID of the export operation, or latest. Currently only latest is currently supported.

Response

Media type application/json
Fetches information about an export of a codespace.

An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest

object
state

State of the latest export

string
nullable
completed_at

Completion time of the last export operation

string format: date-time
nullable
branch

Name of the exported branch

string
nullable
sha

Git commit SHA of the exported branch

string
nullable
id

Id for the export details

string
export_url

Url for fetching export details

string
html_url

Web url for the exported branch

string
nullable
Examples
Example default
{
"state": "succeeded",
"completed_at": "2022-01-01T14:59:22Z",
"branch": "codespace-monalisa-octocat-hello-world-g4wpq6h95q",
"sha": "fd95a81ca01e48ede9f39c799ecbcef817b8a3b2",
"id": "latest",
"export_url": "https://api.github.com/user/codespaces/:name/exports/latest"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}