Skip to main content

codespace_export_details

Creates, updates, deletes, gets or lists a codespace_export_details resource.

Overview

Namecodespace_export_details
TypeResource
Idgithub.codespaces.codespace_export_details

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
idstringId for the export details (example: latest)
branchstringName of the exported branch (example: codespace-monalisa-octocat-hello-world-g4wpq6h95q)
completed_atstring (date-time)Completion time of the last export operation (example: 2021-01-01T19:01:12Z)
export_urlstringUrl for fetching export details (example: https://api.github.com/user/codespaces/:name/exports/latest)
html_urlstringWeb url for the exported branch (example: https://github.com/octocat/hello-world/tree/:branch)
shastringGit commit SHA of the exported branch (example: fd95a81ca01e48ede9f39c799ecbcef817b8a3b2)
statestringState of the latest export (example: succeeded | failed | in_progress)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_export_details_for_authenticated_userselectcodespace_name, export_idGets information about an export of a codespace.

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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
codespace_namestringThe name of the codespace.
export_idstringThe ID of the export operation, or latest. Currently only latest is currently supported.

SELECT examples

Gets information about an export of a codespace.

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

SELECT
id,
branch,
completed_at,
export_url,
html_url,
sha,
state
FROM github.codespaces.codespace_export_details
WHERE codespace_name = '{{ codespace_name }}' -- required
AND export_id = '{{ export_id }}' -- required
;