Export a codespace for the authenticated user
POST
/user/codespaces/{codespace_name}/exports https://api.github.com
Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.
If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead.
OAuth app tokens and personal access tokens (classic) need the codespace scope to use this endpoint.
Parameters
path Path Parameters
| Name | Type |
|---|---|
codespace_name
required
The name of the codespace. | string |
Responses
202 application/json
Response
interface CodespaceExportDetails {
state?: string | null;
completed_at?: string | null;
branch?: string | null;
sha?: string | null;
id?: string;
export_url?: string;
html_url?: string | null;
}
state?: string | null;
completed_at?: string | null;
branch?: string | null;
sha?: string | null;
id?: string;
export_url?: string;
html_url?: string | null;
}
Client Errors
401 application/json
Requires authentication
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
403 application/json
Forbidden
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
404 application/json
Resource not found
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
422 application/json
Validation failed, or the endpoint has been spammed.
interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}
Server Errors
500 application/json
Internal Error
interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}