POST /user/codespaces/{codespace_name}/publish
Publishes an unpublished codespace, creating a new repository and assigning it to the codespace.
The codespace's token is granted write permissions to the repository, allowing the user to push their changes.
This will fail for a codespace that is already published, meaning it has an associated repository.
OAuth app tokens and personal access tokens (classic) need the codespace
scope to use this endpoint.
Servers
- https://api.github.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
codespace_name |
String | Yes |
The name of the codespace. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
name |
String | No |
A name for the new repository. |
private |
Boolean | No |
Whether the new repository should be private. Default value: false |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.